Morning,
Another day, another issue.
I have the following XML:
Code:
<node>
<product>
<manual title="c" />
</product>
<product>
<manual title="a" />
</product>
<product>
<manual title="b" />
</product>
</node>
Now I would like to output a list of all documents for a downlaods area in alphabetical order however I think my XSLT is wrong as I beleive it will be ordering on the <product> node, not <manual>, any pointers?:
Code:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library"
exclude-result-prefixes="msxml umbraco.library">
<xsl:output method="html"/>
<xsl:param name="currentPage"/>
<xsl:template match="/">
<ul>
<xsl:for-each select="$currentPage/ancestor-or-self::node [@level=1]/descendant-or-self::node[string(./data [@alias='umbracoNaviHide']) != '1' and @nodeTypeAlias = 'manual']">
<xsl:sort select="title" order="ascending" data-type="text" />
<li>
<xsl:value-of select="data [@alias = 'title']" />
</li>
</xsl:for-each>
</ul>
</xsl:template>
</xsl:stylesheet>
TIA
Tim
Managing Director at
The Site Doctor Ltd -
My personal blog is here - Umbraco Newbie ;)