I think I stumbled upon a bug in the XSLTC transfomer regarding the document() function. Here is a minimal example:
--- sitemap fragment: -------------------------------------- <match pattern="test"> <generate src="foo.xml"/> <transform src="foo-bar.xsl" type="xsltc"/> <serialize type="xml"/> </match> --- foo.xml: ----------------------------------------------- <foo/> --- bar.xml: ----------------------------------------------- <bar/> --- foo-bar.xsl: ------------------------------------------- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:variable name="foo" select="/"/> <xsl:variable name="bar" select="document('bar.xml')"/> <xsl:template match="/"> <output> <foo><xsl:value-of select="name($foo/*)"/></foo> <bar><xsl:value-of select="name($bar/*)"/></bar> </output> </xsl:template> </xsl:stylesheet> ------------------------------------------------------------ The output I would expect, which is also the output I get using the default xslt (Xalan-J interpretive) transformer is: <output> <foo>foo</foo> <bar>bar</bar> </output> But if I use the xsltc (Xalan-J compiled) transformer the output is: <output> <foo>bar</foo> <bar>bar</bar> </output> It would appear that the document() call overwrites the source document of the transformation, including all existing references to it. Is this a known bug? Can anybody confirm/reproduce it? Tobia --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
