|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Sibling sort after grouping
I have a body of content, structured as:
<content>
<item>
<tag>...</tag>
<tag>...</tag>
<tag>...</tag>
<date>...</date>
...
</item>
...
</content>
My goal is to generate a list of all tags, sortable by date. "Date" in
this context would mean the most recent "date" child of any "item" node
that contains a given "tag" child. Dates are ISO 8601 formatted.
Currently, this list of tags is sorted alphabetically. How can I modify
the below XSL (1.0) to achieve a "last-modified" sort, as outlined above?
<xsl:key name="group-by-tag" select="content/item/tag" use="."/>
...
<xsl:for-each
select="content/node/tag[generate-id()=generate-id(key('group-by-tag',.)[1])]">
<xsl:sort select="." order="ascending"/>
<xsl:value-of select="."/>
</xsl:for-each>
Thank you for any assistance you can provide.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








