[Home] [By Thread] [By Date] [Recent Entries]
Tempore 09:57:50, die 02/09/2005 AD, hinc in
xsl-list@xxxxxxxxxxxxxxxxxxxxxx scripsit SC)bastien BicaC/s
<s.bicais@xxxxxxxxxxx>:
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> 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> Which resulted (correclty) in 2 times "id = ..." 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> Which is not well-formed xml ('</xsl/template>') and caused the ouput file not to be updated. Thus creating the false impression that it returned 2 times "id = ..." again.
|

Cart



