Subject: navigating through recursive defined tree From: Dietmar Dold <dd@xxxxxxxxxxx> Date: Wed, 02 Dec 1998 15:43:42 +0100 |
Hi experts, I was playing around with IE5beta for a while and tried to build a navigation-screen with XSL. Finally I gave up and build a JavaScript with 400lines. Maybe you can find a solution to my problem in XSl( maybe it`s simple) ------------------------ aim: My aim was to produce a DIV for the first hirachie level of the following XML file. A click on one of the element-texts should bring up another div with the content of his next (and only the next child-level). And so on. ------------------------- the (recursive) DTD: // by the way AUSWAHL(German) means CHOICE <!ELEMENT TEST (AUSWAHL)*> <!ELEMENT AUSWAHL (#PCDATA|AUSWAHL)*> ------------------------ a sample xml-document: <?xml:stylesheet type="text/xsl" href="auswahl2.xsl"?> <!DOCTYPE TEST SYSTEM "auswahl1.dtd"> <TEST> <AUSWAHL><!-- first Level --> Belletristik <AUSWAHL><!-- second Level --> Architektur und Design <!-- third Level --> <AUSWAHL>Architektur und Design, Deutschland</AUSWAHL> <AUSWAHL>Architektur und Design, Europa</AUSWAHL> <AUSWAHL>Computergrafik</AUSWAHL> </AUSWAHL> <AUSWAHL><!-- second Level --> Regionen und Epochen </AUSWAHL> ... </AUSWAHL> <AUSWAHL>Schmuck</AUSWAHL> </TEST> ---------------- the result should be: first DIV: "Belletristik" "Schmuck" if you click on "Beletristik" the next DIV should appear (without Serverrequest -> <copy> as solution I guess) with the choices of: "Architektur und Design" "Regionen und Epochen" if you click on "Architektur und Design" the next DIV and so on and so on.... "Architektur und Design, Deutschland" "Architektur und Design, Europa" "Computergrafik" ---------------- Main Problem: How can I get all siblings which are "direkt" children of the Element for example "Belletristik" without getting all descendants? Remember all Elements are called "AUSWAHL". Will be an attribute with a logical numeration a solution, like "a0-n) for the first level, (b0-n) for the second...? Did someone had the same problems and found a solution? Sorry for such a long message! ): Dietmar XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: equal signs in XML attribute va, Kent Fitch | Thread | Re: equal signs in XML attribute va, Steve Muench |
Input Fields in XML, Bernd . Loepmeier | Date | Newbie: How to write a stylesheet t, Francois Belanger |
Month |