|
Subject: [xsl] Is there a way to sometimes bypass a nested for-each group? From: "Mark Wilson" <mark@xxxxxxxxxxxx> Date: Thu, 24 Jul 2008 00:56:53 -0700 |
<xsl:template match="List">
<List>
<!-- There is always a Heading element --> <xsl:for-each-group select="Item" group-by="Heading">
<xsl:sort select="current-grouping-key()"/>
<Item>
<xsl:element name="Heading">
<xsl:attribute name="entry">
<xsl:value-of select="Heading/@entry"/>
</xsl:attribute>
<xsl:value-of select="current-grouping-key()"/>
</xsl:element> <xsl:for-each select="current-group()">
<xsl:sort select="Title"/>
<xsl:sort select="Year"/>
<xsl:sort select="IssueNumber"/>
<xsl:sort select="Page"/>
<Article>
<xsl:apply-templates/>
</Article>
</xsl:for-each>
</xsl:for-each-group>
</Item>
</xsl:for-each-group>
</List>
</xsl:template><!-- Pass these through --> <xsl:template match="Title"><xsl:copy-of select="."/></xsl:template> <xsl:template match="Year"><xsl:copy-of select="."/></xsl:template> <xsl:template match="IssueName"><xsl:copy-of select="."/></xsl:template> <xsl:template match="Person"><xsl:copy-of select="."/></xsl:template> <xsl:template match="Page"><xsl:copy-of select="."/></xsl:template>
<!-- Discard or reformat these --> <xsl:template match="Heading "/> <xsl:template match="SubHeading" /> <xsl:template match="IssueNumber"/>
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Re: Counting preceding elemet, Karlmarx Rajangam | Thread | Re: [xsl] Is there a way to sometim, David Carlisle |
| Re: [xsl] selecting elements by att, Joelle Tegwen | Date | Re: [xsl] Is there a way to sometim, David Carlisle |
| Month |