This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Loop


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]