[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Nodeset displayed as <ul>-list

Subject: Nodeset displayed as <ul>-list
From: Conny Kreyßel <Conny.Kreyssel@xxxxxxxxxxxxxx>
Date: Tue, 1 Aug 2000 12:43:27 +0200
ul list title
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::*) &gt;= $sd and count(ancestor::*)
&lt;= $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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.