grouping references so that they only appear once
Hello, I have a grouping problem that I am hoping someone can help me with. Imagine that I am transforming the following instance, and that I am currently processing the category element with the id "shoes". <?xml version="1.0"?> <doc> <categories> <category id="shoes">Shoes</category> <category id="clothes">Clothing (General)</category> </categories> <makers> <maker id="nike">Nike</maker> <maker id="rebok">Rebok</maker> </makers> <products> <product> <name>Shoe1</name> <categoryRef idref="shoes"/> <categoryRef idref="clothes"/> <makerRef idref="nike"/> </product> <product> <name>Shoe2</name> <categoryRef idref="shoes"/> <categoryRef idref="clothes"/> <makerRef idref="nike"/> </product> <product> <name>Shoe3</name> <categoryRef idref="shoes"/> <categoryRef idref="clothes"/> <makerRef idref="rebok"/> </product> </products> </doc> I want to get a list of all the makers that have products that reference the shoes category, but I don't want a single maker to appear more than once. I have been able to use keys to gather a list of products that reference a category, and from there I can get the makerRefs, and with another set of keys I can then get the makers, but I can't see how to ensure that each maker is only listed once since multiple products reference the same makers. Any help would be appreciated. Rick 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