|
Subject: Re: [xsl] Data sequence From: Mukul Gandhi <gandhi.mukul@xxxxxxxxx> Date: Fri, 22 Oct 2010 14:03:46 +0530 |
Following Mike's algorithm, I think this is probably you'll exactly
need (this is one of the solutions):
<xsl:for-each select="author">
<xsl:sort select="number(@seq)"/>
<xsl:apply-templates select="." mode="x" />
</xsl:for-each>
<xsl:template match="author" mode="x">
<au>
<xsl:copy-of select="@*" />
<xsl:copy-of select="node()" />
</au>
</xsl:template>
This is not tested.
On Fri, Oct 22, 2010 at 1:24 PM, JS rawat <jrawat@xxxxxxxxxxxxxx> wrote:
>
> Hi Team,
> Is there any quick idea about how to sequence the authors in the output
> file.
>
> Input
> <article>
> <author seq="1">author 1</author>
> <author seq="3">author 3</author>
> <author seq="2">author 2</author>
> </article>
>
> Desired output
> <article>
> <au seq="1">author 1</author>
> <au seq="2">author 2</author>
> <author seq="3">author 3</author>
> </article>
>
> Thanks in advance
> ...JSR
--
Regards,
Mukul Gandhi
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Data sequence, JS rawat | Thread | [xsl] Replace function, Meeraj Kunnumpurath |
| Re: [xsl] Data sequence, Michael Kay | Date | RE: [xsl] Data sequence, JS rawat |
| Month |