Re: [xsl] Sorting an xml

Subject: Re: [xsl] Sorting an xml
From: "Jagdishwar B" <jagdishwar.beemanati@xxxxxxxxx>
Date: Mon, 22 May 2006 17:18:56 +0200

The printout for this should be sorted by <place> like this:
Kyl och frys:
Lax 8 st
Grddde 1,2 l

Frukt och grvnt:
Chalottenlvk 4 st

Matlagningsvin 0,66  l

It would be easier to understand if you give what output xml you are
looking for.

you can try:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
	<!-- default identity translation -->
	<xsl:template match="*|@*|comment()|processing-instruction()|text()">
	<!-- start processing with the root element  -->
	<xsl:template match="shopinglist">
			<xsl:apply-templates select="item">
				<xsl:sort select="place"/>

It will reorder the source xml item elements according to the "place"


Jagdishwar B.

Current Thread