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

Re: Display text and all the following nodes except <

Subject: Re: Display text and all the following nodes except <anchor> and <pb>
From: "J. S. Rawat" <jrawat@xxxxxxxxxxxxxx>
Date: Thu, 18 Sep 2008 14:29:50 +0530
Re:  Display text and all the following nodes except  <
I am doing the same. Below is my code!!!
<div id="docnav">
<ul>
<xsl:for-each select="//docGroup//div[@type='ss1']">
<li>
<a>
<xsl:attribute name="href">#sec<xsl:number format="1"
count="//docGroup//div[@type='ss1']" level="any" from="docGroup"
/></xsl:attribute>
<xsl:apply-templates select="head" mode="toc"/>
</a>
</li>
</xsl:for-each>
</ul>
</div>


<xsl:template match="div[@type='ss1']/head" mode="toc">
<xsl:apply-templates select="*[not(name(.)='anchor' or name(.)='pb')] |text()"/>
</xsl:template>


<xsl:template match="div/head">
   <xsl:choose>
      <xsl:when test="../@type='ss1'">
         <h2>
            <xsl:apply-templates/>
         </h2>
   </xsl:choose>
</xsl:template>


At 02:20 PM 9/18/2008, David Carlisle wrote:



> Actually I want to make TOC of the chapter and I want anchor in one
> place but not in another place that why George's solution  does not
> fit for me

making TOC is the motivating use case for modes. Use one mode
for the main body and another mode for the toc.

David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs.
________________________________________________________________________

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.