|
Subject: [xsl] What is the simplest method for using xsl:sort without losing attribute names and values? From: "Mark Wilson" <mark@xxxxxxxxxxxx> Date: Sat, 19 Jul 2008 23:56:09 -0700 |
Thanks for any help, Mark
<xsl:template match="*">
<xsl:copy>
<xsl:apply-templates>
<xsl:sort select="Year" />
<xsl:sort select="IssueNumber"/>
<xsl:sort select="Page" />
</xsl:apply-templates>
</xsl:copy>
</xsl:template> <xsl:template match="Cat">
<xsl:element name="Cat">
<xsl:attribute name="pofis">
<xsl:value-of select="@pofis" />
</xsl:attribute>
<xsl:attribute name="pofis-number">
<xsl:value-of select="@pofis-number" />
</xsl:attribute>
<xsl:if test="@pofis-range">
<xsl:attribute name="pofis-range">
<xsl:value-of select="@pofis-range" />
</xsl:attribute>
</xsl:if>
<xsl:if test="@pofis-prefix">
<xsl:attribute name="pofis-prefix">
<xsl:value-of select="@pofis-prefix" />
</xsl:attribute>
</xsl:if>
<xsl:value-of select="node()" />
</xsl:element>
</xsl:template>| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [no subject], Unknown | Thread | Re: [xsl] What is the simplest meth, Mukul Gandhi |
| [no subject], Unknown | Date | [xsl] Fwd: xml/xslt line break, Taly |
| Month |