RE: [xsl] Table of contents

Subject: RE: [xsl] Table of contents
From: "Andrew Welch" <awelch@xxxxxxxxxxxxxxx>
Date: Fri, 2 Aug 2002 14:42:12 +0100
<sub-chapter >
  <s-title>Red</title>
 </chapter>

Firstly, this isn't well-formerd xml, it should (probably) read:

<sub-chapter >
   <s-title>Red</s-title>
</sub-chapter>

I can see this is probably down to a typo, but you should really make
sure people can copy your source xml verbatim if necessary to help speed
the debugging.

To help solve your problem, I would look up <xsl:number>, the rest is
basic xslt

cheers
andrew

  




> -----Original Message-----
> From: Jan Zavoral [mailto:zavoral@xxxxxxxxxxx]
> Sent: 02 August 2002 13:46
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] Table of contents
> 
> 
> 
> Hello,
> 
> I am a new in XSL. Please I need your help. I have XML 
> document like this:
> 
> <colors>
> <chapter>
>  <title>Colors</title>
> </chapter>
> 
> <sub-chapter >
>  <s-title>Red</title>
> </chapter>
> .
> .
> .
> .
> <sub-chapter>
>  <s-title>Green</title>
> </chapter>
> .
> .
> </colors>
> 
> I need to create Table of contents like this:
> 
> <h1>Colors</h1>
> <h2>1.1 red</h2>
> <h2>1.2 green</h2>
> <h2>1.2 blue</h2>
> 
> In this xml document is many elements. I need only select
> element <title> and <s-title> and display it on start of text.
> Output-method is HTML.
> 
> Thanks
> 
> Jan Zavoral
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ---
> Odchozí zpráva neobsahuje viry.
> Zkontrolováno antivirovým systémem AVG (http://www.grisoft.cz).
> Verze: 6.0.380 / Virová báze: 213 - datum vydání: 24.7.2002
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 
> 
> 
> 
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.373 / Virus Database: 208 - Release Date: 01/07/2002
>  
> 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.373 / Virus Database: 208 - Release Date: 01/07/2002
 

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


Current Thread