This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: xsl:sort question
- From: Sripriya Venkataraman <Sripriya dot Venkataraman at calipertech dot com>
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Date: Fri, 26 Apr 2002 11:23:14 -0700
- Subject: RE: [xsl] xsl:sort question
- Reply-to: xsl-list at lists dot mulberrytech dot com
It works. Thanks a lot Joerg.
Thanks,
Priya
-----Original Message-----
From: Joerg Heinicke [mailto:joerg.heinicke@gmx.de]
Sent: Friday, April 26, 2002 11:15 AM
To: xsl-list@lists.mulberrytech.com
Subject: Re: [xsl] xsl:sort question
Hello Priya,
your approach is correct, but incomplete. When you sort for @WellName,
then the nodes will be selected alphabetically. The second sort will
only have an effect, if two nodes are equal in the first sort criteria.
What you need:
<xsl:sort select="substring(@WellName,1,1)"/>
<xsl:sort select="substring(@WellName,2)" data-type="number"/>
Regards,
Joerg
> I am not getting the above result with my XSL. What is the problem ?
> <xsl:template match="ANALYSISRESULTS">
> <xsl:variable name="wells" select="//WELL"/>
> <xsl:for-each select="$wells">
> <xsl:sort select="@WellName"/>
> <xsl:sort select="substring(@WellName,2)"
> data-type="number"/>
> <xsl:for-each select="@*">
> <xsl:value-of select="."/> <xsl:value-of
> select="$tab"/>
> </xsl:for-each>
> <xsl:value-of select="$newline"/>
> </xsl:for-each>
> </xsl:template>
>
> Thanks,
> Priya
> X 323
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list