How do I split info into sections via XSLT?
February 23, 2007 3:29 PM
Subscribe
I need to take an XML list and split it into sections/subsections by keying off a child element. Samples and
I need to change my source XML into an XML output that will: (1) split out sections per children elements; (2) split out child sections per titles (e.g., alphabetically); and (3) title the child sections per alphabet (e.g, A, B, C...). Actually, it'll be easier to explain with these examples:
Example Source XML:
AAA
AAA definition
< !--where cat1, cat2, etc. specify which termdef go in which output section. some termdefs will be in multiple sections -->
>
ABB
ABB definition
BBB
BBB definition
BCC
BCC definition
Example Output XML:
Cat1 Defs
A Defs
AAA
AAA definition
ABB
ABB definition
Cat2 Defs
A Defs
ABB
ABB definition
B Defs
BBB
BBB definition
Cat3 Defs
A Defs
AAA
AAA definition
B Defs
BBB
BBB definition
BCC
BCC definition
Any ideas? I've been looking at this too long...
posted by sfkiddo to computers & internet (5 comments total)
posted by nakedsushi at 4:01 PM on February 23, 2007