Subject: RE: Re: <xsl:for-each> problem ?
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Mon, 23 Jul 2001 10:12:40 +0100
|
> Hi, my xsl does not generate the right html output. The problem
> seems to be <xsl:for-each>. Instead of the two stocks for each
> date, I get all four stocks for each date (conflicts with how
> data is in my xml file).
>
> <xsl:for-each select="FTSE100/DATE">
...
> <xsl:for-each select="/FTSE100/DATE/STOCK">
..
The inner for-each is selecting every /FTSE100/DATE/STOCK in the source
document. You want to select the STOCK elements that are children of the
outer DATE element. Change it to
<xsl:for-each select="STOCK">
Mike Kay
Software AG
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|