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

RE: linking within a document

Subject: RE: linking within a document
From: "kfricovsky" <kfricovsky@xxxxxxxxxxx>
Date: Wed, 28 Nov 2001 11:13:38 -0500
linking within a document
Give this a try Adam,

For the links at the top:

		<table>
			<xsl:for-each select="artist">
				<tr>
					<!-- this will set the anchor
link using the position of the artist element -->
					<td>
						<a href="#{position()}">
							<xsl:value-of
select="name"/>
						</a>
					</td>
				</tr>
			</xsl:for-each>
		</table>

Then below for your description use:

		<table>
			<xsl:for-each select="artist">
				<tr>
					<!-- this will be where the
links above link to and where the detailed info goes -->
					<td>
						<a name="#{position()}">
							<xsl:value-of
select="name"/>
						</a>
						<br/>
					<!-- I renamed your "some
detail" to "some_detail" -->
						<xsl:value-of
select="some_detail"/>
					</td>
				</tr>
			</xsl:for-each>
		</table>

This will work.

Cheers,

Kevin


-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Adam
Claridge
Sent: Wednesday, November 28, 2001 1:40 AM
To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
Subject:  linking within a document


Hi List,

I am just embarking upon the XSL path and so please forgive a 
[possibly] very simple question.

My xml is something like:

<root>
   <artist>
     <id>
       <id_name>person's name</id_name>
       <id_number>#1</id_number>
     </id>
     <name>person's name</name>
     <some detail>xxxx</some detail>
   </artist>
   <artist>
    <as above>
    </as above>
   </artist>
</root>

I want to end up with an html doc that lists the names of the artists 
in a table at the top such that they link to the artists' individual 
table [which holds all their deatails] further down the page.

I can get the layout OK, but cannot figure out how to make the names 
link! Any and all advice is much appreciated.

Cheers,

Adam

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 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.