Candy
11-21-2001, 04:22 PM
Hi,
If you have the following code, where do you insert this xsl:sort element
line?
<xsl:sort select="./softwaretitle" order="ascending" data-type="text"/>
<xsl:template match="/tipsheets/tipsheet/softwaretitle">
<xsl:variable name="curtitle" select="."/>
<xsl:for-each select=".">
<xsl:sort select="." order="ascending" data-type="text"/>
<xsl:if test="not (preceding::softwaretitle[.=$curtitle])">
<option><xsl:attribute name="value"><xsl:value-of select="$curtitle"/></xsl:attribute><xsl:value-of
select="$curtitle"/></option>
</xsl:if>
</xsl:for-each>
</xsl:template>
I have tried it in all sorts of places and it won't work. This template displays
softwaretitle in a drop down list and removes duplicates.
Thank you,
Candy
If you have the following code, where do you insert this xsl:sort element
line?
<xsl:sort select="./softwaretitle" order="ascending" data-type="text"/>
<xsl:template match="/tipsheets/tipsheet/softwaretitle">
<xsl:variable name="curtitle" select="."/>
<xsl:for-each select=".">
<xsl:sort select="." order="ascending" data-type="text"/>
<xsl:if test="not (preceding::softwaretitle[.=$curtitle])">
<option><xsl:attribute name="value"><xsl:value-of select="$curtitle"/></xsl:attribute><xsl:value-of
select="$curtitle"/></option>
</xsl:if>
</xsl:for-each>
</xsl:template>
I have tried it in all sorts of places and it won't work. This template displays
softwaretitle in a drop down list and removes duplicates.
Thank you,
Candy