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=3548 *** shadow/3548 Tue Sep 11 07:17:37 2001 --- shadow/3548.tmp.25842 Tue Sep 11 07:17:37 2001 *************** *** 0 **** --- 1,76 ---- + +============================================================================+ + | new RTF as node-set feature throws type check error on Svante Schubert's e | + +----------------------------------------------------------------------------+ + | Bug #: 3548 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 | + There is a new XSLTC feature for converting RTFs to node sets, + which is working as far as some initial testing shows. The following example + (with a few simplifications) provided by Svante Schubert + has uncovered a problem. Saxon produces the expected output + + <Test>Output: GOOD1 ++ The attribute of e1 is flag ++ The attribute of e1 is + flag</Test> + + XSLTC fails to compile the stylesheet with the following error: + + Compile errors: + Type check error in FilterParentPath(variable-ref(var-RTF), step("child", 3, + pred(step("attribute", 7)))). + Error: Cannot find class 'variableTest'. + + variableTest.xsl + ---------------- + <?xml version="1.0"?> + <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" + xmlns:xt="http://www.jclark.com/xt" + xmlns:xalan="http://xml.apache.org/xalan"> + <xsl:output method="xml" indent="yes"/> + + + <xsl:variable name="var-RTF"> + <xsl:element name="e1"> + <xsl:attribute name="a2">flag</xsl:attribute> + <xsl:text>GOOD1</xsl:text> + </xsl:element> + <xsl:element name="e1"> + <xsl:text>BAD</xsl:text> + </xsl:element> + <xsl:element name="e1"> + <xsl:attribute name="a2">flag</xsl:attribute> + <xsl:text>GOOD2</xsl:text> + </xsl:element> + </xsl:variable> + + + <!-- <xsl:variable name="var" select="$var-RTF"/> --> + + <xsl:template match="/"> + <xsl:element name="Test"> + <xsl:text>Output: </xsl:text> + + <xsl:value-of select='$var-RTF/*[@a2]'/> + <xsl:for-each select='$var-RTF/e1[@a2]'> + <xsl:text> ++ The attribute of e1 is </xsl:text> + <xsl:value-of select='@a2'/> + </xsl:for-each> + + </xsl:element> + </xsl:template> + + </xsl:stylesheet> + + variableTest.xml + ---------------- + <?xml version="1.0" ?> + <doc/>
