Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > Other Languages

Reply
 
LinkBack Thread Tools
Old July 24th, 2006, 07:03 PM   #1
New Member
 

Join Date: Jul 2006
Location: New Jersey
Age: 39
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 bonekrusher is on a distinguished road
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:
  <?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:
  <?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>
bonekrusher is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Tags
toc , index


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 August 15th, 2007 09:59 AM
google-index cyclone2876 Search Engine Optimization (SEO) 3 June 26th, 2007 10:24 AM
Z-index problems terrycr HTML, XHTML and CSS 1 June 14th, 2007 06:40 AM
/index homepage R8515198 HTML, XHTML and CSS 8 May 25th, 2007 10:38 AM
Z-Index or Tables? JohnMitch HTML, XHTML and CSS 7 February 28th, 2005 10:56 PM


Search Engine Optimization by vBSEO 3.2.0 RC8