[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: reordering output (Again)
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|