cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 27275] - xsl:sort not sorting correctly
Date Tue, 09 Mar 2004 00:21:09 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=27275>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=27275

xsl:sort not sorting correctly

joerg.heinicke@gmx.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME



------- Additional Comments From joerg.heinicke@gmx.de  2004-03-09 00:21 -------
Hello Khanh Vo,

I tested exactly your stylesheet and it works for me, I get the output

<Document>
  <p class="MsoBodyText">
    <span style="font-family:"Times New Roman"">one</span>
  </p>
  <p class="MsoBodyText">
    <span style="font-family:"Times New Roman"">two</span>
  </p>
  <p class="MsoBodyText">
    <span style="font-family:"Times New Roman"">three</span>
  </p>
</Document>

with the one and only template in the stylesheet:

  <xsl:template match="/*">
    <xsl:copy>
      <xsl:for-each select="Para">
        <xsl:sort data-type="number" select="substring-before(current(),':')"/> 
        <p class="MsoBodyText">
          <span style="font-family:&quot;Times New Roman&quot;">
            <xsl:value-of select="substring-after(current(),':')"/>
          </span>
        </p>
      </xsl:for-each>
    </xsl:copy>
  </xsl:template>

Now I can only start with wild guessing: Are you sure the for-each is executed?
If you get exactly the output below I guess the template containing the for-each
is not accessed at all. Maybe you can solve this issue on a XSLT list like
Mulberry's: http://www.mulberrytech.com/xsl/xsl-list/.

Joerg

Mime
View raw message