|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: selecting similar nodes
Perhaps you want something like:
<xsl:for-each select="//ITEM">
...
<xsl:variable name="d" select="descr"/>
<xsl:for-each select="following-sibling::ITEM[descr=$d]">
...
</xsl:for-each>
</xsl:for-each>
> -----Original Message-----
> From: Sargeant, Richard (GEIS) [mailto:Richard.Sargeant@xxxxxxxxxxx]
> Sent: 01 September 1999 12:08
> To: xsl-list@xxxxxxxxxxxxxxxx
> Subject: selecting similar nodes
>
>
> Hi,
>
> I trying to select any following nodes with the same DESCR
> node but I
> can't quite get it right.
>
> for example my XML file looks like -
>
> <ITEM>
> <DESCR>aaaaa</DESCR>
> <NUM>1001</NUM>
> </ITEM>
> <ITEM>
> <DESCR>aaaaa</DESCR>
> <NUM>1002</NUM>
> </ITEM>
> <ITEM>
> <DESCR>aaaaa</DESCR>
> <NUM>1003</NUM>
> </ITEM>
> <ITEM>
> <DESCR>xxxxx</DESCR>
> <NUM>1004</NUM>
> </ITEM>
>
> If my current node is 1001, I want to be able to process
> 1002, and 1003 at
> the same time. So I thought the following would work...
>
> <xsl:for-each select="from-following(DESCR[text()=text()])">
> <xsl:call-template name="Details"/>
> </xsl:for-each>
>
> What am I doing wrong ?
>
> regards ... Richard
>
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
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








