|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Simple grouping with XSL2
I'm trying to do a simple grouping and then post the siblings but I'm a little bit confused. I have the following XML: <?xml version="1.0" encoding="UTF-8"?> <Entries> <entry> <First>First Group</First> <Second>sample data I</Second> </entry> <entry> <First>Second Group</First> <Second>sample data II</Second> </entry> <entry> <First>First Group</First> <Second>sample data III</Second> </entry> </Entries> I'm trying to group the data using the <First> tag and then show all the <Second> tags data. Example of the result: <Entries> <entryTransformation> <data>First Group</data> <secondaryData>sample data I</secondaryData> <secondaryData>sample data III</secondaryData> </entryTransformation> <entryTransformation> <data>Second Group</data> <secondaryData>sample data II</secondaryData> </entryTransformation> </Entries> I'm using <xsl:for-each-group select="/Entries/entryTransformation/data" group-by="."> To make the grouping, but then I don't know how to iterate the <Second> elements. Thanks, Andy.
|
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
|






