Hi, 2010 is coming so the website of out local fire department (www.brandweerkoudekerk.nl) needs a update. A new years has to be added.. But.. What is the best way to do this with XSLT;
I have a list of nodes all containing a date field, i want to get a list with all unique years (for navigation purposes offcourse).
I had a similar request earlier this year (list of keywords) and ended up writing an XSLT Extension for that. Get all the news nodes and get the date property from that add the unique years to an xml document and return that as a XpathNodeIterator what you can use in your xslt again. The example below shows you how to build an xml fragment and returns that as an XpathNodeIterator
Then you can configure the xslt Extension as described in this blogpost. While writing this reply I was looking for more concrete examples but couldn't findi those. Could be the first Blogpost/WIKI page for 2010 :-)
I've seen some post on how to do that with 100% pure XSLT but I couldn't read that code ;-)
Getting Unique years from date field
Hi, 2010 is coming so the website of out local fire department (www.brandweerkoudekerk.nl) needs a update. A new years has to be added.. But.. What is the best way to do this with XSLT;
I have a list of nodes all containing a date field, i want to get a list with all unique years (for navigation purposes offcourse).
Thanks for any suggestions.
Walter
Hi Walter,
I had a similar request earlier this year (list of keywords) and ended up writing an XSLT Extension for that. Get all the news nodes and get the date property from that add the unique years to an xml document and return that as a XpathNodeIterator what you can use in your xslt again. The example below shows you how to build an xml fragment and returns that as an XpathNodeIterator
Then you can configure the xslt Extension as described in this blogpost. While writing this reply I was looking for more concrete examples but couldn't findi those. Could be the first Blogpost/WIKI page for 2010 :-)
I've seen some post on how to do that with 100% pure XSLT but I couldn't read that code ;-)
Hope this puts you in the right direction.
Cheers,
Richard
is working on a reply...