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=3463 *** shadow/3463 Thu Sep 6 08:12:15 2001 --- shadow/3463.tmp.22198 Thu Sep 6 08:12:15 2001 *************** *** 0 **** --- 1,106 ---- + +============================================================================+ + | xsltc fails conf test position78 with Type check error in pred(parameter-r | + +----------------------------------------------------------------------------+ + | Bug #: 3463 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 | + Expected Ouput + -------------- + <?xml version="1.0" encoding="UTF-8"?> + <out>There are 5 preceding text nodes + Position 1 is Item-3B + Position 2 is Item-3A + Position 3 is Item-2A + Position 4 is Item-1B + Position 5 is Item-1A + </out> + + + Obtained Output (on compile) + ---------------------------- + Compile errors: + Type check error in pred(parameter-ref(this)). + Error: Cannot find class 'position78'. + + + position78.xsl + -------------- + <?xml version="1.0"?> + <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <!-- FileName: position78 --> + <!-- Document: http://www.w3.org/TR/xpath --> + <!-- DocVersion: 19991116 --> + <!-- Section: 2.2 --> + <!-- Purpose: Look at preceding axis (reverse document order) filtered by node + test. --> + <!-- Author: David Marston --> + + <xsl:template match="/"> + <out> + <xsl:apply-templates select=".//center" /> + </out> + </xsl:template> + + <xsl:template match="center"> + <xsl:variable name="num" select="count(preceding::text())" /> + <xsl:text>There are </xsl:text> + <xsl:value-of select="$num"/> + <xsl:text> preceding text nodes + </xsl:text> + <xsl:call-template name="display-loop"> + <xsl:with-param name="this" select="1"/> + <xsl:with-param name="total" select="$num"/> + </xsl:call-template> + </xsl:template> + + <xsl:template name="display-loop"> + <xsl:param name="this"/> + <xsl:param name="total"/> + <xsl:text>Position </xsl:text> + <xsl:value-of select="$this"/> + <xsl:text> is </xsl:text> + <xsl:value-of select="preceding::text()[$this]"/> + <xsl:if test="$this < $total"> + <xsl:call-template name="display-loop"> + <xsl:with-param name="this" select="$this + 1"/> + <xsl:with-param name="total" select="$total"/> + </xsl:call-template> + </xsl:if> + </xsl:template> + + </xsl:stylesheet> + + + position78.xml + -------------- + <?xml version="1.0"?> + <far-north>Item-1A + <north-north-west/>Item-1B + <north>Item-2A + <near-north>Item-3A + <west/>Item-3B + <center>Item-4A + <near-south-west/>Item-4B + <near-south>Item-5A + <south>Item-6A + <far-south/>Item-6B + </south>Item-5B + </near-south>Item-4C + <near-south-east/>Item-4D + </center>Item-3C + <east/>Item-3D + </near-north>Item-2B + </north>Item-1C + <north-north-east/>Item-1D + </far-north>
