PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL BE LOST SOMEWHERE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2921 *** shadow/2921 Tue Jul 31 08:11:09 2001 --- shadow/2921.tmp.12003 Tue Jul 31 08:11:09 2001 *************** *** 0 **** --- 1,57 ---- + +============================================================================+ + | attribute outside of element with "*|@*" vs "@*|*" | + +----------------------------------------------------------------------------+ + | Bug #: 2921 Product: XalanJ2 | + | Status: NEW Version: CurrentCVS | + | Resolution: Platform: All | + | Severity: Major OS/Version: All | + | Priority: Other Component: org.apache.xalan.xsltc | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + An identity transform fails with + + Translet Error: attribute 'color' outside of element + + + with the following XML document + + <?xml version="1.0" ?> + <lot> + <car color="red" make="honda"> + <plate>HJU-789</plate> + </car> + <car color="silver" make="honda"> + <plate>HXU-000</plate> + </car> + <car color="black" make="honda"> + <plate>ZXU-040</plate> + </car> + </lot> + + and sytlesheet + + <xsl:stylesheet version='1.0' + xmlns:xsl='http://www.w3.org/1999/XSL/Transform'> + + <xsl:template match="/lot"> + <out> + <xsl:apply-templates/> + </out> + </xsl:template> + + <xsl:template match="*|@*|comment()|processing-instruction()|text()"> + <xsl:copy> + <xsl:apply-templates + select="*|@*|comment()|processing-instruction()|text()"/> + </xsl:copy> + </xsl:template> + </xsl:stylesheet> + + Note that if you reverse the order of the "*|@*" tokens, the + problem goes away.
