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

Re: xsl:output method="xml"

Subject: Re: xsl:output method="xml"
From: Mukul Gandhi <mukulw3@xxxxxxxxx>
Date: Wed, 30 Jul 2003 09:06:42 -0700 (PDT)
xsl output method xml
Please try the following XSL 

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"   
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   <xsl:output method="xml" version="1.0"
encoding="UTF-8" indent="yes"/>
   <xsl:template match="ROWSET">
     <ROWSET>
       <xsl:for-each select="ROW">
       <xsl:sort select="value" data-type="number"/>
	 <ROW rownum="{position()}">
	    <value>
		<xsl:value-of select="value"/>
  	    </value>
 	 </ROW>
	</xsl:for-each>
      </ROWSET>
    </xsl:template>
</xsl:stylesheet>


Regards,
Mukul


--- "Frank J. Buono"
<Frank.Buono@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> 
> I've seen a lot of examples of outputing in HTML;
> however,
> I'd like to sort on "value" and output in XML - see
> input and
> desired output XML below.
> 
> Can anybody help with what my stylesheet should look
> like?
> 
> Thanks.
> 
> Frank
> p.s., I'll be doing this within java code.
> 
> ****Input:
> <ROWSET>
>    <ROW rownum="1">
>       <value>3</value>
>    </ROW>
>    <ROW rownum="2">
>       <value>1</value>
>    </ROW>
>    <ROW rownum="3">
>       <value>2</value>
>    </ROW>
> </ROWSET>
> 
> *****Output:
> <ROWSET>
>    <ROW rownum="1">
>       <value>1</value>
>    </ROW>
>    <ROW rownum="2">
>       <value>2</value>
>    </ROW>
>    <ROW rownum="3">
>       <value>3</value>
>    </ROW>
> </ROWSET>
> 
> 
>  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.