Re: XML hierarchy

Subject: Re: XML hierarchy
From: Jany Quintard <quintard.j@xxxxxx>
Date: Fri, 11 Feb 2000 11:14:11 +0100 (CET)
On Wed, 9 Feb 2000, David Carlisle wrote:
> > I am quite new to xsl (having practiced dsssl before)
> 
> That's OK just sed -e "s/(/</g"  -e "s/)/>/g" 
> You want something like this
>         <xsl:number format="1.1 " 
>   level="multiple" count="div1|div2|div3|div4|div5"/>
> 
> David
Thanks David. With this I checked anew http://www.w3.org/TR/xslt and
found what I needed at chapter: 7.7 Numbering
As often, the problem is to know what you are looking for. 
So, my stylesheet looks like :
.../...
        <div class="toc">
          <h1 align="center">Ze table of ze matieres</h1>
          <ul>
          <xsl:apply-templates select="//title"
                               mode="toc"/>
          </ul>
.../...
<!-- MODE TOC -->
.../...
  <xsl:template match="title"
                mode="toc">
    <li>
      <xsl:number level="multiple"
                  from="body"
                  count="d"
                  format="1.1 "/>
                   
      <xsl:apply-templates mode="toc"/>
    </li>
  </xsl:template>

By the way, it did not work properly. But by changing my processor, I
found that it was a bug in the old one.

Thanks to John E. Simpson with his useful link to ken Holman's stylesheets
(http://www.cranesoftwrights.com/resources/showtree/index.htm)
and to Emmanuel Pietriga. Emmanuel,I think I need to be a little more
skilled in xsl programming, but I will explore the issue you indicated.

Jany



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread