This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: XSL to Sort XML Doc return XML Doc ?
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] XSL to Sort XML Doc return XML Doc ?
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Fri, 1 Jun 2001 08:57:01 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
<xsl:template match="records">
<xsl:copy>
<xsl:for-each select="*"><xsl:sort select="."/>
<xsl:copy-of select="."/>
</xsl:for-each>
</xsl:copy>
</xsl:template>
Mike Kay
Software AG
> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Hasselback,
> Matt
> Sent: 31 May 2001 19:18
> To: xsl-list@lists.mulberrytech.com
> Subject: [xsl] XSL to Sort XML Doc return XML Doc ?
>
>
> Hello...
>
> I'm aiming to sort an xml document, and return the same xml
> document, in
> its sorted transformation. Is there an easy way to go about
> doing this?
>
> Example:
>
> <records>
> <record>B</record>
> <record>H</record>
> <record>A</record>
> <record>D</record>
> <record>C</record>
> <record>G</record>
> <record>F</record>
> <record>E</record>
> </records>
>
> return:
>
> <records>
> <record>A</record>
> <record>B</record>
> <record>C</record>
> <record>D</record>
> <record>E</record>
> <record>F</record>
> <record>G</record>
> <record>H</record>
> </records>
>
> Thanks for any help ...
> -Matt
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list