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

RE: Table of contents

Subject: RE: Table of contents
From: "Andrew Welch" <awelch@xxxxxxxxxxxxxxx>
Date: Fri, 2 Aug 2002 14:42:12 +0100
table of contents xsl
<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:  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

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-2013 All Rights Reserved.