[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] extracting all elem names of an attribute
Hello, How best is the following text extracted from the following xml, possibly using keys or some other xslt constructs? ==== size: small, medium, large crust: thin, pan topping: olives, pepperoni, peppers ==== <db> <large category="size"> <thin category="crust"> <olives category="topping/> <pepperoni category="topping/> </thin> <pan category="crust"> <pepperoni category="topping/> </pan> </large> <medium category="size"> <pan category="crust"> <pepperoni category="topping/> <olives category="topping/> <peppers category="topping/> </pan> </medium> <small category="size"> <thin category="crust"> <olives category="topping/> <pepperoni category="topping/> <peepers category="topping/> </thin> <pan category="crust"> <pepperoni category="topping/> <olives category="topping/> <peepers category="topping/> </pan> </small> </db> The basic approach involves: - using keys to get a unique list of possible values for the @category attribute - iterating over these values - printing each followed by a colon - getting a unique list of all xml element names which contain this particular attribute value - iterating over these values printing each printing an endline Many thanks and Best regards, Saverio 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
|