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=3440 *** shadow/3440 Wed Sep 5 11:34:30 2001 --- shadow/3440.tmp.10202 Wed Sep 5 11:34:30 2001 *************** *** 0 **** --- 1,138 ---- + +============================================================================+ + | xsltc fails conf test position70 with strip-space | + +----------------------------------------------------------------------------+ + | Bug #: 3440 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 | + The purpose of the test is to ensure that when strip-space is in effect white + space text nodes are not included in the node set selected by apply-templates. + However, there may be more than one problem reflected by the difference between + the obtained and expected results. + + Expected Results + ---------------- + <?xml version="1.0" encoding="UTF-8"?> + <out>A(1):attC(2): This is the 1st comment T(3): + text-in-doc + E(4):innerT(1): + inner-text + C(2): This is the 2nd comment E(3):subT(1):subtext + T(4): + text-after + + T(5): + text-in-doc2 + E(6):inner2A(1):blatE(1):subT(1):subtext + T(2):final-text + + </out> + + + Obtained Results + ---------------- + <?xml version="1.0" encoding="utf-8" ?> + <out>A(1):attT(2): + text-in-doc + E(3):innerT(1): + inner-text + E(2):subT(1):subtext + T(3): + text-after + + T(4): + text-in-doc2 + E(5):inner2A(1):blatE(1):subT(1):subtext + T(2):final-text + + </out> + + position70.xsl + -------------- + <?xml version="1.0"?> + <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <!-- FileName: position70 --> + <!-- Document: http://www.w3.org/TR/xslt --> + <!-- DocVersion: 19991116 --> + <!-- Section: 5.4 --> + <!-- Creator: David Marston --> + <!-- Purpose: Test that set of nodes changes when strip-space is in effect. + --> + <!-- "The xsl:apply-templates instruction processes all children of the + current node, + including text nodes. However, text nodes that have been stripped as + specified + in 3.4 Whitespace Stripping will not be processed." --> + + <xsl:strip-space elements="doc inner inner2"/> + + <xsl:template match="/doc"> + <out> + <xsl:apply-templates select="*|@*|comment()|text()"/> + </out> + </xsl:template> + + <xsl:template match="*"><!-- for child elements --> + <xsl:text>E(</xsl:text> + <xsl:value-of select="position()"/> + <xsl:text>):</xsl:text> + <xsl:value-of select="name()"/> + <xsl:apply-templates select="@*"/> + <xsl:apply-templates/> + <xsl:text> + </xsl:text> + </xsl:template> + + <xsl:template match="@*"> + <!-- The parser has freedom to present attributes in any order it wants. + Input file should have only one attribute if you want consistent results + across parsers. --> + <xsl:text>A(</xsl:text> + <xsl:value-of select="position()"/> + <xsl:text>):</xsl:text> + <xsl:value-of select="name()"/> + </xsl:template> + + <xsl:template match="text()"> + <xsl:text>T(</xsl:text> + <xsl:value-of select="position()"/> + <xsl:text>):</xsl:text> + <xsl:value-of select="."/> + </xsl:template> + + <xsl:template match="comment()"> + <xsl:text>C(</xsl:text> + <xsl:value-of select="position()"/> + <xsl:text>):</xsl:text> + <xsl:value-of select="."/> + </xsl:template> + + </xsl:stylesheet> + + position70.xml + -------------- + <?xml version="1.0"?> + <doc att="top"> + <!-- This is the 1st comment --> + text-in-doc + <inner> + inner-text + <!-- This is the 2nd comment --> + <sub>subtext</sub> + text-after + </inner> + text-in-doc2 + <inner2 blat="bar"> + <sub>subtext</sub>final-text + </inner2> + </doc>
