http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2538 *** shadow/2538 Tue Jul 10 07:47:14 2001 --- shadow/2538.tmp.24973 Tue Jul 10 07:47:14 2001 *************** *** 0 **** --- 1,62 ---- + +============================================================================+ + | xsltc does not merge attrib sets with same name | + +----------------------------------------------------------------------------+ + | Bug #: 2538 Product: XalanJ2 | + | Status: NEW Version: 2.0.0 | + | Resolution: Platform: Sun | + | Severity: Normal OS/Version: Solaris | + | Priority: Other Component: org.apache.xalan.xsltc | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + When use-attribute-sets references more than one set with the same name and they + contain different attributes, the resulting set should be a merge. XSLTC fails + conformance test attribset27, because it fails to merge. + + + Obtained Output + =============== + <?xml version="1.0" encoding="utf-8" ?> + <out text-decoration="none"/> + + Expected Output + =============== + <?xml version="1.0" encoding="utf-8"?> + <out text-decoration="none" color="black" font-size="14pt"/> + + Stylesheet (snippet) + ==================== + + + <xsl:template match="/"> + <out> + <xsl:copy use-attribute-sets="set1"> + <xsl:attribute name="text-decoration">none</xsl:attribute> + </xsl:copy> + </out> + </xsl:template> + + <xsl:attribute-set name="set1"> + <xsl:attribute name="text-decoration">underline</xsl:attribute> + </xsl:attribute-set> + + <xsl:attribute-set name="set1"> + <xsl:attribute name="color">black</xsl:attribute> + </xsl:attribute-set> + + <xsl:attribute-set name="set1"> + <xsl:attribute name="font-size">14pt</xsl:attribute> + </xsl:attribute-set> + + Analysis + ======== + The obtained output correctly has + text-decoration="none" because the value directly defined in the copy element + should override any definition of text-decoration in the attribute set set1. + However, xsltc fails to merge the font-size and color attributes into set1 and + output them. Both XT and Xalan give the expected result.
