Get distinct values of a field in all nodes within a specified node
Hi,
I'm still only a real newcomer to XSLT, so I'm not sure if this is even possible, but I'm trying to pick out all distinct values from a particular text field in all page nodes within a certain containing page node, and then display these in a list.
Firstly, is this possible? Secondly, if so, can someone point me in the right direction to do this as I can't find any XSLT templates which do anything like this?
If you're new XSLT you might have difficulty applying this to your situation. If that is the case add some detail on your site/node structure and someone should be able to help.
Get distinct values of a field in all nodes within a specified node
Hi,
I'm still only a real newcomer to XSLT, so I'm not sure if this is even possible, but I'm trying to pick out all distinct values from a particular text field in all page nodes within a certain containing page node, and then display these in a list.
Firstly, is this possible? Secondly, if so, can someone point me in the right direction to do this as I can't find any XSLT templates which do anything like this?
Thanks!
Hi,
I've just googles "XSLT Distinct" and it comes up with a lot of results.
Something like this would do the trick:
http://are.ehibou.com/xslt-xpath-selecting-distinct-nodes/
If you're new XSLT you might have difficulty applying this to your situation. If that is the case add some detail on your site/node structure and someone should be able to help.
Cheers
Paul
Hi Dan
One way I do it is with the following xslt variable;
This works for my node structure but may need to be tweaked for yours.
Cheers
Evan
Evan I can't add Karma yet, but just to let you know your solution to the OP helped me immensely - thank you!
is working on a reply...