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

Re: generating <a href="#section"> menus. Related to <

Subject: Re: generating <a href="#section"> menus. Related to <xsl:for-each> and generate-id()
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Tue, 14 Jan 2003 13:59:46 +0000
xsl generating a href
Hi Sherzod,

> To go further with my nonsense... I tried:
>
>  <xsl:template match="sect">
>    <a name="{generate-id()}"><xsl:value-of select="title" /></a>
>  </xsl:template>
>
> to book mark each section with unique name. And somewhere else, 
> I wanted to get the list of all the generated names(ids) and titles for
> the table of contents.

You just need to make sure that the IDs that you reference in the
table of contents are generated in the same way as the IDs that you
generate in the body of the document. So if you're creating anchors
with:

  <a name="{generate-id()">...</a>

then you need to create references to those anchors with:

  <a href="#{generate-id()}">...</a>

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 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.