I’m an xsl n00b and trying to find all unique xml nodes under the <section> node
Here’s my code:
<section>
<books>
<book>
<title>Child 44</title>
<author>Thomas Rob Smith</author>
<price>5.00</price>
</book>
<book>
<title>Atlas Shrugged</title>
<author>Ayn Rand</author>
<price>7.00</price>
</book>
</books>
<cds>
<cd>
<title>A Passage in time</title>
<band>Authority Zero</band>
<price>10.00</price>
</cd>
</cds>
</section>
Here is my desired output:
books
cds
Thanks in advance!
This transformation:
when applied on the provided XML document:
produces the wanted, correct result:
Do note: The Munchian method for grouping is used. This is probably the most efficient grouping method for XSLT 1.0.