Hi everybody, While playing with forrest/cocoon/xslt, i found something very strange.
I've got two different behavior of a document() function inside an xslt stylesheet. I don't know if it's a bug or a feature. If document() takes its parameter from a stylesheet variable ($filename), xalan try to load the file from the same directory than the .xsl file. If it takes its parameter from an attribute of the .xml which is being transformed (@filename), it try to load the file from the same directory than the .xml file. Any idea ? file.xml -------- <?xml version="1.0"?> <test1/> <test2 filename="test.xml/> file.xsl -------- <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="filename"/> <xsl:template match="test1"> <xsl:apply-template select="document($filename)"/> </xsl:template> <xsl:template match="test2"> <xsl:apply-templates select="document(@filename)"/> </xsl:template>
