http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2603 *** shadow/2603 Thu Jul 12 11:51:39 2001 --- shadow/2603.tmp.23226 Thu Jul 12 11:51:39 2001 *************** *** 0 **** --- 1,65 ---- + +============================================================================+ + | xsltc fails conf test copy18 copy-of with union of attribute nodes. | + +----------------------------------------------------------------------------+ + | Bug #: 2603 Product: XalanJ2 | + | Status: NEW Version: 2.0.1 | + | Resolution: Platform: Other | + | Severity: Major OS/Version: Other | + | Priority: Other Component: org.apache.xalan.xsltc | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + XSLTC fails conf test copy18 in two ways. First, the copy-of instruction within + an xsl:element before anything else is written to the output destination should + write attribute nodes to the created element. XSTLC is using the output from the + copy-of to create elements rather than attributes. Second, nothing is being + output for the element in the XML source with has both attributes specified in + the union select expression. + + XSL + === + <xsl:template match="TEST"> + <xsl:element name="out"> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + + <xsl:template match="ELEMENT"> + <xsl:element name="item"> + <xsl:copy-of select="@x|@z"/> + </xsl:element> + </xsl:template> + + XML + === + <?xml version="1.0"?> + <TEST RELEASE="R6.0"> + <ELEMENT x="100000"/> + <ELEMENT x="2" y="3" z="4"/> + <ELEMENT x="33333"/> + </TEST> + + Obtained Output + =============== + <?xml version="1.0" encoding="utf-8" ?> + <out> + <item><ELEMENT x="100000"/></item> + + <item/> + <item><ELEMENT x="33333"/></item> + + </out> + + Expected Output + =============== + <?xml version="1.0" encoding="UTF-8"?> + <out> + <item x="100000"/> + <item x="2" z="4"/> + <item x="33333"/> + </out>
