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=3402 *** shadow/3402 Tue Sep 4 07:13:05 2001 --- shadow/3402.tmp.22549 Tue Sep 4 07:13:05 2001 *************** *** 0 **** --- 1,102 ---- + +============================================================================+ + | xsltc fails conf tests mdocs12 and mdocs13 with compile error | + +----------------------------------------------------------------------------+ + | Bug #: 3402 Product: XalanJ2 | + | Status: NEW Version: CurrentCVS | + | Resolution: Platform: All | + | Severity: Critical OS/Version: All | + | Priority: Other Component: org.apache.xalan.xsltc | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + Here's the details for mdocs12 + + Expected Output + --------------- + <?xml version="1.0" encoding="UTF-8"?> + <out> + + <ped:test xmlns:ped="ped.com" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + attrib="yeha">YEE-HA</ped:test> + + </out> + + + Obtained Output on Compile + -------------------------- + java.lang.ClassCastException: org.apache.xalan.xsltc.compiler.LiteralElement + at + org.apache.xalan.xsltc.compiler.Stylesheet.setImportPrecedence(Stylesheet.java:163) + at + org.apache.xalan.xsltc.compiler.Include.parseContents(Include.java:125) + at + org.apache.xalan.xsltc.compiler.Stylesheet.parseOwnChildren(Stylesheet.java:342) + at + org.apache.xalan.xsltc.compiler.Stylesheet.parseContents(Stylesheet.java:314) + at org.apache.xalan.xsltc.compiler.Parser.createAST(Parser.java:343) + at org.apache.xalan.xsltc.compiler.XSLTC.compile(XSLTC.java:315) + at org.apache.xalan.xsltc.compiler.XSLTC.compile(XSLTC.java:231) + at org.apache.xalan.xsltc.compiler.XSLTC.compile(XSLTC.java:350) + at org.apache.xalan.xsltc.cmdline.Compile.main(Compile.java:160) + + mdocs12.xsl + ----------- + <?xml version="1.0"?> + <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" + xmlns:ped="ped.com" + exclude-result-prefixes="xsl ped"> + + <!-- FileName: mdocs12 --> + <!-- Document: http://www.w3.org/TR/xpath --> + <!-- DocVersion: 19991116 --> + <!-- Section: 12.1 Multiple Source Documents --> + <!-- Creator: David Marston --> + <!-- Purpose: When document('') refers to the root node of the stylesheet, + it means the current file, not the main stylesheet. In this test, the call + to + document() is in the included stylesheet, hence local to it. --> + <!-- Remember: every top-level node in the stylesheet must have a namespace. + --> + + <xsl:include href="xincmdocs12.xsl"/> + + <xsl:template match="doc"> + <out><xsl:text> + </xsl:text> + <xsl:apply-templates/><xsl:text> + </xsl:text> + </out> + </xsl:template> + + <ped:test attrib="yeha">Oops</ped:test> + <ped:test attrib="haye">Wrong item from main</ped:test> + + mdocs13.xml + ----------- + <?xml version="1.0" ?> + <doc> + <test>ERROR</test> + </doc> + + xincmdocs12.xsl + --------------- + <?xml version="1.0"?> + <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" + xmlns:ped="ped.com" + exclude-result-prefixes="xsl ped"> + + <!-- Purpose: Included by mdocs12 --> + + <xsl:template match="test"> + <xsl:copy-of select="document('')/xsl:stylesheet/ped:test[@attrib='yeha']"/> + </xsl:template> + + <ped:test attrib="yeha">YEE-HA</ped:test> + <ped:test attrib="haye">Wrong item from sub</ped:test> + + </xsl:stylesheet>
