I'm attempting to XSLT transform an InfoPath document from XML to HTML, and I get the following error:
Cannot find a script or an extension object associated with namespace 'http://schemas.microsoft.com/office/infopath/2003/xslt/xDocument'.
Is it even possible to transform the document? I note the XSL makes use of functions such as xdXDocument:GetDOM
which look like the old MSXML syntax. Can you add support for MSXML during the transform?
For reference the Namespace is:
xmlns:xdXDocument="http://schemas.microsoft.com/office/infopath/2003/xslt/xDocument"
This article suggests that you simply use the Print View of the InfoPath document - but I think that might be unique to InfoPath 2007 (post-2010 it seems you can print any view).
As an aside, I also tried using MSXML and I got a similar error:
Namespace 'http://schemas.microsoft.com/office/infopath/2003/xslt/xDocument' does not contain any functions.
Here's my MSXML code:
var xml = new MSXML2.DOMDocument60();
xml.load(txtXmlFilePath.Text);
var lines = File.ReadAllLines(txtXslFilePath.Text);
// Seemingly need to strip out first <?xml... /> line to work
string sXsl = string.Join("\n", lines.Skip(1).ToArray());
var xsl = new MSXML2.DOMDocument60();
xsl.loadXML(sXsl);
string html = xml.transformNode(xsl);
So the basic question remains - how do you transform an XSLT transform an InfoPath document?