|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] listing 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
|
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
|

Cart








