Subject: Nodeset displayed as <ul>-list From: Conny Kreyßel <Conny.Kreyssel@xxxxxxxxxxxxxx> Date: Tue, 1 Aug 2000 12:43:27 +0200 |
I would like build my website with XML/XSL. The navigation should automaticly generated with XSL. So I have written the structure from my website in XML. A example: <tree> <nav id="123" title="Page 1"/> <nav id="124" title="Page 2"> <nav group="section 1"/> <nav id="125" title="Page 4"> <nav id="126" title="Page 5"/> <nav id="127" title="Page 6"/> <nav id="128" title="Page 7"/> </nav> <nav id="129" title="Page 8"> <nav id="130" title="Page 9"/> </nav> . . <nav group="section 2"/> <nav id="131" title="Page 11"/> . . </nav> </tree> Ok now I would describe you my intention. The "id"-attribute its only for selection. The "title"-attribute should be the text whos displayed in the navigation-list. The "group"-attribute is only used as a seperator. Now i would select a node-set as follows: <xsl:for-each select="id($navid)/ancestor::* | id($navid)/ancestor::*/child::*"> <xsl:if test="count(ancestor::*) >= $sd and count(ancestor::*) <= $ed"> <xsl:if test="boolean(@title)"> <xsl:value-of select="@title"/> </xsl:if> <xsl:if test="boolean(@group)"> <b><xsl:value-of select="@group"/></b> </xsl:if> <br/> </xsl:if> </xsl:for-each> $navid is the id which tag I select - $sd is the start-depth and $ed is the end-depth of the node-set. Now my problem: In this case all "title" will right displayed and in the right order. But I would like also display the structure of the node-set in a list(<ul>, <li>). How must I redesign the code to display the structure right? I have tried to create the list like the example in "XSLT Programmers Reference" (Page 302) but it will not worked in cocoon. The <xsl:text disable-output-escaping="yes"> dont work. Can you please help me? - Conny - XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: portability. (Re: microsoft lat, Kay Michael | Thread | RE: Nodeset displayed as <ul>-list, Ben Robb |
RE: portability. (Re: microsoft lat, Kay Michael | Date | RE: Nodeset displayed as <ul>-list, Ben Robb |
Month |