Subject: RE: [xsl] xsl:output method= From: cknell@xxxxxxxxxx Date: Wed, 30 Jul 2003 11:54:44 -0400 |
<?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" indent="yes" encoding="UTF-8" /> <xsl:template match="/"> <xsl:apply-templates /> </xsl:template> <xsl:template match="ROWSET"> <ROWSET> <xsl:for-each select="ROW"> <xsl:sort select="value" data-type="number" order="ascending" /> <ROW rownum="{@rownum}"><value><xsl:value-of select="." /></value></ROW> </xsl:for-each> </ROWSET> </xsl:template> </xsl:stylesheet> -- Charles Knell cknell@xxxxxxxxxx - email -----Original Message----- From: "Frank J. Buono" <Frank.Buono@xxxxxxxxxxxxxxxxxxxxxxx> Sent: Wed, 30 Jul 2003 10:02:07 -0400 To: <XSL-List@xxxxxxxxxxxxxxxxxxxxxx> Subject: [xsl] xsl:output method="xml" 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 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Global variables, Andrew Welch | Thread | AW: [xsl] Passing HTML to template, Markus Abt |
RE: [xsl] traversing to next Elemen, Tengshe, Ashish | Date | RE: [xsl] traversing to next Elemen, G. Ken Holman |
Month |