In the following situation where I have a XML which needs to transformed with a XSL file using the transformNode method I get an error. I have catched the err.number which is -2147467259
The XSL file uses an import in which I have created a xsl:variable. When using this variable in the main XSL I get the error.
I load the XML and XSL with Javascript using Microsoft.XMLHTTP
When both files are loaded I do the transformation with xmlDoc.transformNode(xslDoc);
What's the reason of this error and how can I fix it. The XSL as a stylesheet in the XML works fine when I open the XML in the webbrowser.
Here is the XSL which I used to test this.
Code:
1 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
2 <xsl:import href="global.xsl"/>
3 <xsl:variable name="langfile" select="concat('/int/', $language, '/menu.xml')"/>
4
5 <xsl:template match="/content/menu">
6 <h1>Menu</h1>
7 </xsl:template>
8 </xsl:stylesheet>
The error is triggered by line 3. When removing this line the transformation is successfull
The global.xsl file
Code:
1 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
2 <xsl:variable name="language" select="document('/configuration.xml')/configuration/language"/>
3 </xsl:stylesheet>
Additional information:
For parsing I use the XML DOM Document from Microsoft.
The browsers which I'm using are IE6 and IE7
Does anyone have an idea?