xsl-list
[Top] [All Lists]

listing links in xsl?

2003-12-17 11:11:52
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



<Prev in Thread] Current Thread [Next in Thread>