http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2098 *** shadow/2098 Sun Jun 10 09:17:04 2001 --- shadow/2098.tmp.23570 Sun Jun 10 09:17:04 2001 *************** *** 0 **** --- 1,27 ---- + +============================================================================+ + | document() doesn't work in standalone stylesheets | + +----------------------------------------------------------------------------+ + | Bug #: 2098 Product: XalanJ2 | + | Status: NEW Version: 2.0.x | + | Resolution: Platform: All | + | Severity: Major OS/Version: Other | + | Priority: Other Component: Xalan | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + The document() function called from a standalone or embedded stylesheet returns +nothing. The exact same function call from a stylesheet with an external source tree +works. + + Example 1 (document() returns null): + + <?xml version="1.0"?><?xml-stylesheet href="#me" type="text/xsl"?><?cocoon-process +type="xslt"?><xsl:stylesheet id="me" +xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template +match="xsl:stylesheet"> <foo>Foo: <xsl:copy-of +select="document('testForm.xml')"/></foo> </xsl:template></xsl:stylesheet> + + Example 2: (called from a document containing empty node <dummy/>; document() +returns specified file, as it should) + + <?xml version="1.0"?><xsl:stylesheet id="me" +xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="dummy"> + <foo>Foo: <xsl:copy-of select="document('testForm.xml')"/></foo> +</xsl:template></xsl:stylesheet> + + Occurs with Xalan 2.1.0. Tested on Mac OS X only. Encountered 6/10/01. \ No newline at end of file
