Subject: Re: [xsl] Re: Sorting on two levels From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 15 Apr 2015 14:03:36 -0000 |
The suggestion offered yesterday works great as far as the sorting, but I need to do certain things to each item in a group as it's output, such as wrapping each ID in an <a> element. What I tried is shown below, but it results in @href containing *all* the ids for the group. How do I process each item in a group separately? Do I need to at some point just do <xsl:apply-templates select=" current-group()"> and then rely on templates for primary, secondary, etc.? I did try that but couldn't seem to get it to work -- either I got no output, or I got the entire group in a chunk.
<a>
<xsl:attribute name="href">
<xsl:value-of select="current-group()/@id"/>
</xsl:attribute>
<xsl:value-of select="current-group()/@id" separator=", "/>
<xsl:for-each select="current-group()"> <a href="{@id}"> <!-- not sure what you want to output for the link --> <xsl:value-of select="@id"/> </a> </xsl:for-each>
<xsl:template match="indexterm" mode="link"> <a href="{@id}"> <!-- not sure what you want to output for the link --> <xsl:value-of select="@id"/> </a> </xsl:template>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: Sorting on two levels, Michele R Combs mrro | Thread | Re: [xsl] Re: Sorting on two levels, Michele R Combs mrro |
[xsl] Re: Sorting on two levels, Michele R Combs mrro | Date | Re: [xsl] Re: Sorting on two levels, Michele R Combs mrro |
Month |