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=2939 *** shadow/2939 Tue Jul 31 15:06:33 2001 --- shadow/2939.tmp.13765 Tue Jul 31 15:06:33 2001 *************** *** 0 **** --- 1,91 ---- + +============================================================================+ + | xsltc fails conf test match16 not doing position numbering relative to the | + +----------------------------------------------------------------------------+ + | Bug #: 2939 Product: XalanJ2 | + | Status: NEW Version: 2.0.0 | + | 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 | + Expected Output (verified with Saxon, XT, and Xalan) + ==================================================== + <?xml version="1.0" encoding="utf-8"?> + <out> + <first>hello</first><other/> + <first>goodbye</first><other/><other/> + <first>aloha</first> + <first>shalom</first><other/><other/></out> + + Obtained Output + =============== + <?xml version="1.0" encoding="utf-8" ?> + <out><other/><other/><other/><other/><other/></out> + + XSL + === + <?xml version="1.0"?> + <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + + <!-- FileName: match16 --> + <!-- Document: http://www.w3.org/TR/xslt --> + <!-- DocVersion: 19991116 --> + <!-- Section: 5.2 --> + <!-- Creator: David Marston --> + <!-- Purpose: Test step//step[predicate], with positional predicate, to show + that position numbering applies "relative to the child axis", not //. --> + + <xsl:output method="xml" encoding="utf-8"/> + + <xsl:template match="/"> + <out> + <xsl:for-each select="*"> + <xsl:apply-templates/> + </xsl:for-each> + </out> + </xsl:template> + + <xsl:template match="chapter//footnote[1]"> + <xsl:text> + </xsl:text> + <first> + <xsl:value-of select="."/> + </first> + </xsl:template> + + <xsl:template match="chapter//footnote[position() != 1]"> + <other/> + </xsl:template> + + <xsl:template match="text()"/><!-- Suppress text matching --> + + </xsl:stylesheet> + + XML + === + <?xml version="1.0"?> + <chapter> + <section> + <footnote>hello</footnote> + <footnote>ahoy</footnote> + </section> + <section> + <footnote>goodbye</footnote> + <footnote>sayonara</footnote> + <footnote>adios</footnote> + </section> + <section> + <footnote>aloha</footnote> + <subsection> + <footnote>shalom</footnote> + <footnote>yo</footnote> + </subsection> + <footnote>ciao</footnote> + </section> + </chapter> \ No newline at end of file
