Subject: Re: [xsl] Select and display a node From: "Joris Gillis" <roac@xxxxxxxxxx> Date: Wed, 09 Feb 2005 10:59:23 +0100 |
Hi,<xsl:template match="rss/channel" > <xsl:for-each select="item/page[@id=456]"> id = <xsl:value-of select="@id"/> </xsl:for-each> </xsl/template>
But when I run this, I get "id = 456" twice..
Any suggestion welcome
I can only see 2 possible explanations: 1) Your real input XML contains elements with the same 'id' attributes. 2) You're not using any tool that displays error messages.
You tried this first: <xsl:template match="rss/channel" > <xsl:for-each select="item/page"> id = <xsl:value-of select="@id"/> </xsl:for-each> </xsl:template>
And then you changed to: <xsl:template match="rss/channel" > <xsl:for-each select="item/page[@id=456]"> id = <xsl:value-of select="@id"/> </xsl:for-each> </xsl/template>
regards, -- Joris Gillis (http://www.ticalc.org/cgi-bin/acct-view.cgi?userid=38041) Fiat W3C in tenebris
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Select and display a node, Sébastien Bicaïs | Thread | RE: [xsl] Select and display a node, Sébastien Bicaïs |
Re: [xsl] Addressing siblings, Joris Gillis | Date | Re: [xsl] Addressing siblings, Joris Gillis |
Month |