http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2595 *** shadow/2595 Thu Jul 12 05:54:41 2001 --- shadow/2595.tmp.20143 Thu Jul 12 05:54:41 2001 *************** *** 0 **** --- 1,49 ---- + +============================================================================+ + | xsltc fails boolean43 not recognizing a result tree frag has a root node | + +----------------------------------------------------------------------------+ + | Bug #: 2595 Product: XalanJ2 | + | Status: NEW Version: 2.0.1 | + | Resolution: Platform: All | + | Severity: Normal OS/Version: All | + | Priority: Other Component: org.apache.xalan.xsltc | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + XSLTC fails conformance test boolean43, which tests the boolean value of an + empty result tree fragment. XSLTC returns false, but the expected result is + true, although that may seem counterintuitive. + + According to Scott Boag, Gary Peskin, Dave Bertoni, and Paul Dick -- using + Scott's words: + + An RTF has an implicit root node, so it is never empty. See + http://www.w3.org/TR/xslt#section-Result-Tree-Fragments (which the comment + in the test should reference). It states: "A result tree fragment is + treated equivalently to a node-set that contains just a single root node. + + XSL + === + <xsl:variable name="emptyResultTreeFragTest"> + <xsl:value-of select="foo"/> + </xsl:variable> + + <xsl:template match="doc"> + <out> + <xsl:value-of select="boolean($emptyResultTreeFragTest)"/> + </out> + </xsl:template> + + Obtained Output + =============== + <?xml version="1.0" encoding="utf-8" ?> + <out>false</out> + + Expected Output + =============== + <?xml version="1.0" encoding="UTF-8"?> + <out>true</out>
