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

RE: reordering output (Again)

Subject: RE: reordering output (Again)
From: "Chris Bayes" <chris@xxxxxxxxxxx>
Date: Mon, 22 Oct 2001 16:08:56 +0100
list reordering
Eric,
You probably want to do something like
<xsl:template match="book">	
	<xsl:apply-templates select="para[not(@b)]" />
</xsl:template>
<xsl:template match="para">
	<xsl:choose>
		<xsl:when test="following::para[@b]">
			<xsl:copy-of select="." />
			<xsl:apply-templates
select="following::para[@b]">
				<xsl:sort select="@b" />
			</xsl:apply-templates>
		</xsl:when>
		<xsl:otherwise>
			<xsl:copy-of select="." />
		</xsl:otherwise>
	</xsl:choose>
</xsl:template>
<xsl:template match="para[@b]">
	<xsl:copy-of select="." />
</xsl:template>
But it depends on how complex you mean by complex.

Ciao Chris

XML/XSL Portal
http://www.bayes.co.uk/xml


> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Eric Smith
> Sent: 22 October 2001 13:42
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  reordering output (Again)
> 
> 
> I asked the question in a previous mail to this list but 
> received no reponse.
> 
> In short, perhaps someone may advise:
> Is reordering of nodes in the output possible?
> 
> Many thanks
> 
> -- 
> Eric Smith - currently xalan and fop on linux
> 
>  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

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.