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

listing links in xsl?

Subject: listing links in xsl?
From: "james walker" <jameswalkerandy@xxxxxxxxxxx>
Date: Wed, 17 Dec 2003 18:11:52 +0000
links in xsl
given this xml structure (there are many links inside root):
<root>
<link>
<title>.......</title>
<url>....</url>
<description>.....s</description>
</link>
<root>

i am trying to list the links on a web page by ndl links (links that contain '.ndl') and then by html links. So far i have created a key:
xsl:key name="ndl-links" match="link" use="contains(url, '.ndl')=true" />
which i though would assign a key to the links which contain '.ndl'?


when i try and loop through the key it doesnt show the ndl links, however it does show the html links?

<xsl:template match="root">
	<ul>

	<xsl:for-each select="key('ndl-links', contains(url, '.ndl')=true)">
		<xsl:variable name="urlink" select="url" />
		<li>
			<a href="$urlink"><xsl:value-of select="title" /></a>
			<p><xsl:value-of select="description"/></p>
		</li>
	</xsl:for-each>


</ul>
</xsl:template>
i think it may be that i defined the key incorrectly but i just cant seem to wort it out? sos if this seems simple.
cheers
james


_________________________________________________________________
Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger



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.