[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: embedding links from xml to html using {}
Subject: Re: embedding links from xml to html using {}
From: "Kevin Nardi" <kevnardi@xxxxxxxxxxx>
Date: Thu, 26 Jul 2001 15:01:10 -0700
|
<xsl:template match="event">
<a href="#{venueId}">
<xsl:value-of select="//venueInfo/venueName[../venueId =
current()/venueId]" />
</a>
<br />
</xsl:template>
I think. ;)
I'm new at this too.
-Kevin
From: "Runni Vermel" <runni@xxxxxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: <XSL-List@xxxxxxxxxxxxxxxxxxxxxx>
Subject: embedding links from xml to html using {}
Date: Thu, 26 Jul 2001 14:41:57 -0700
so, here's my problem, bear with me since i AM a newbie.
here goes: my xml tree is as follows:
<notification>
<event>
<venueId>457</venueId>
<bunch of more stuff here></bunch of more stuff>
</event>
<event>
<venueId>457</venueId>
<bunch of more stuff here></bunch of more stuff>
</event>
<venueInfo>
<venueId>venueid3</venueId>
<venueName>venuename3</venueName>
</venueInfo>
<venueInfo>
<venueId>venueid3</venueId>
<venueName>venuename3</venueName>
</venueInfo>
</notification>
what i wanna do is do this:
both events have a venueId and both venueInfo also have a venueId. in my
xml
page, i have a list of events, and the corresponding venues. there will
always be a match between the event venueId and the venueInto venueId.
(hope
that made sense).
so, i'm trying to link the venueName with the venueId as the link as such:
<a href ="#<venueId />"><xsl:apply-templates select="//venueName"/></a>
yes, i know that isn't correct xsl, i just wanted to explain it in the
easiest way.
so, i tried using this:
<a href ="#{venueId}"><xsl:apply-templates select="//venueName"/></a>
alas, reality (and the parser) laughed in my face - this code is only
returning the FIRST venueId - it's not going through the xml tree - only
grabbing the first one...
this is a problem, because even though my sample only has two venueIds, in
fact, i have allot more.
any suggestions are GREATLY appreciated...
thanks,
runni
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
|
Atom 0.3 |
|
|