RE: [xsl] linking within a document

Subject: RE: [xsl] linking within a document
From: "kfricovsky" <kfricovsky@xxxxxxxxxxx>
Date: Wed, 28 Nov 2001 11:13:38 -0500
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: [xsl] 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