This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Loop
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Loop
- From: "Tim Watts" <timw at 3d3 dot com>
- Date: Thu, 30 Aug 2001 14:03:44 +1000
- Reply-To: xsl-list at lists dot mulberrytech dot com
Carlos,
I don't know exactly what you mean by verify? Do you want to ensure it is
not a null value, or if it is text or a number?
Still, here is the X-path that should give the value-of each 'test'. I will
leave it to you to explain exactly what you mean by "verify"
<xsl:for-each select="test">
<xsl:value-of select="."/>
<xsl:value-of select="preceding-sibling::*[1]"/>
</xsl:for-each>
Hope that helps in some way,
Tim
PS.
you may want to use
<xsl:value-of select="preceding-sibling::*[1][self::test]"/>
to ensure that the value of the precedeing-sibling was a 'test' node
> -----Original Message-----
> From: Carlos Durand Silvestrin
>
> I want to construct one loop that verify the current node
> and the previous
> node like this:
>
> <xsl:for-each select="test">
>
> verify the value of current node
> verify the value of previous node
>
> </xsl:for-each>
>
> thanks!!
>
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
- References:
- Loop
- From: Carlos Durand Silvestrin