[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Sorting an xml

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

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

Vvrigt:
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"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<!-- default identity translation -->
	<xsl:template match="*|@*|comment()|processing-instruction()|text()">
		<xsl:copy>
			<xsl:apply-templates
select="*|@*|comment()|processing-instruction()|text()"/>
		</xsl:copy>
	</xsl:template>
	<!-- start processing with the root element  -->
	<xsl:template match="shopinglist">
		<xsl:copy>
			<xsl:apply-templates select="item">
				<xsl:sort select="place"/>
			</xsl:apply-templates>
		</xsl:copy>
	</xsl:template>
</xsl:stylesheet>

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


--


Jagdishwar B.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.