This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: reordering output (Again)
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] reordering output (Again)
- From: "Chris Bayes" <chris at bayes dot co dot uk>
- Date: Mon, 22 Oct 2001 16:08:56 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
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@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com] On Behalf Of Eric Smith
> Sent: 22 October 2001 13:42
> To: xsl-list@lists.mulberrytech.com
> Subject: [xsl] 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