|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Fwd: How to list items
The first part of your question looks like a classic "flatten-the-hierarchy" problem, while the second is another grouping issue where you want to traverse the ancestor axis and pick up the elements whose name is "Class". Does anyone else see it this way?
See http://sources.redhat.com/ml/xsl-list/2000-07/msg00463.html, and more generally, http://www.jenitennison.com/xslt/hierarchies-in.html. If you can't make any sense of it, and no one else replies with more specific information, get back to the list and I'll work on this specific case with you. -- Charles Knell cknell@xxxxxxxxxx - email -----Original Message----- From: David Ohlemacher <ohlemacher@xxxxxxx> Sent: Tue, 01 Jul 2003 15:44:06 -0400 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Fwd: How to list items Hi everyone, I am new to XSL and this list. This example isn't exactly what I need but it is close and simpler to explain. == BACKGROUND = Assume we have the XML file below that contains any number of classes each of which have any number of subclasses. Also subclasses can have subclasses, etc. == QUESTION = Is it possible to write a XSL sheet to list each class and under the class write an indented list of the subclasses for it? The thing that makes this difficult is that the subclass lists may have class entries for classes that have not yet been listed (or never will be). I would further like an additional list of superclasses (not shown) for each class. TIA, -d
.. classA_n .. classZ classZ_1 classA_n classZ_1 .. classZ_n <!--------------- myFile.xml ----------------> <ontology id=""> <Class id="classA"> <comment>blah blah</comment> <subClassOf> <Class id="classA_1"> <comment>blah blah</comment> <subClassOf> <Class id="classA_1_1"> <comment>blah blah</comment> </Class> </subClassOf> </Class> </subClassOf> . . . <subClassOf> <Class id="classA_n"> <comment>blah blah</comment> </Class> </subClassOf> <subClassOf> <Class id="classZ_1"> <comment>blah blah</comment> </Class> </subClassOf> </Class> . . . <Class id="classZ"> <subClassOf> <Class id="classZ_1"> <comment>blah blah</comment> </Class> </subClassOf> . . . <subClassOf> <Class id="classA_n"> <comment>blah blah</comment> </Class> </subClassOf> </Class> </ontology> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list 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
|

Cart








