Reference: http://www.jenitennison.com/xslt/grouping/muenchian.html
How do you take a list of elements and arrange them into groups in your XSLT stylesheet?
<contact id="0001"> <title>Mr</title> <forename>John</forename> <surname>Smith</surname> </contact> <contact id="0002"> <title>Dr</title> <forename>Amy</forename> <surname>Jones</surname> </contact> ... </records> |
|
The Muenchian Method is a method developed by Steve Muench for performing these functions in a more efficient way using keys. Keys work by assigning a key value to a node and giving you easy access to that node through the key value. If there are lots of nodes that have the same key value, then all those nodes are retrieved when you use that key value. Effectively this means that if you want to group a set of nodes according to a particular property of the node, then you can use keys to group them together.
No comments:
Post a Comment