|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] grouping by attribute
Hi, Is there a better way to achieve the following. My XML file contains item with a category attribute and I need to group each category separately, for example <item category="aaa">xxxxxxx</item> <item category="bb">xxxxxxx</item> <item category="zzz">xxxxxxx</item> <item category="bb">xxxxxxx</item> <item category="yyy">xxxxxxx</item> At the moment I simply use <xsl:sort select=@category/> to sort and then test if the category changes by comparing the current category with the previous item's category. I know I can use a xsl:for-each and select each category in turn but is it possible to select all the items of each category without having hardcode the category into the xsl script ? regards Richard Sargeant XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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








