TOC and Index

This is a discussion on "TOC and Index" within the Other Programming Languages section. This forum, and the thread "TOC and Index are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Other Programming Languages

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jul 24th, 2006, 23:03
New Member
Join Date: Jul 2006
Location: New Jersey
Age: 38
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
TOC and Index

Hi All, I am new at XML and XSL and I am trying to build a simple TOC.
this is what I have so far: Any help would be great.

XML:

Code: Select all
  <?xml  version="1.0" encoding="UTF-8" ?> 
 - 

    <Title />  

  - <Sec1>
     <Title>Section 1</Title> 

   </Sec1>


  - <Sec1>
     <Title>Section 2</Title> 

   </Sec1>


   </Chapter>


    <booktitle>test</booktitle> 

   </Book>
XSL File:

Code: Select all
  <?xml  version="1.0" encoding="ISO-8859-1" ?> 
  f(clean);  
  - <xsl:stylesheet version="1.0"  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   - <xsl:template match="/">
   - <html>
   - <body>
     <h3>TOC</h3> 

  - <ul>
   - <xsl:for-each select="Chapter/Sec1">
   - <li>
   - <a href="#{generate-id(Sec1)}">
     <xsl:value-of select="title" /> 

   </a>


   </li>


   </xsl:for-each>


   </ul>


    <hr />  

  - <xsl:for-each select="Chapter/Sec1">
    Chapter: 
  - <a name="{generate-id(title)}">
     <xsl:value-of select="title" /> 

   </a>


    <br />  

   Title: 
    <xsl:value-of select="title" /> 

    <hr />  

   </xsl:for-each>


   </body>


   </html>


   </xsl:template>


   </xsl:stylesheet>
Reply With Quote

Reply

Tags
toc, index

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
google and index dab42pat Search Engine Optimization (SEO) 5 Aug 15th, 2007 13:59
google-index cyclone2876 Search Engine Optimization (SEO) 3 Jun 26th, 2007 14:24
Z-index problems terrycr Web Page Design 1 Jun 14th, 2007 10:40
/index homepage R8515198 Web Page Design 8 May 25th, 2007 14:38
Z-Index or Tables? JohnMitch Web Page Design 7 Mar 1st, 2005 02:56


All times are GMT. The time now is 13:47.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43