This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Problem to compare a value with a set of tag content
- From: Xavier DAMAY <xsl dot list at netcourrier dot com>
- To: XSL-List <XSL-List at lists dot mulberrytech dot com>
- Date: Wed, 29 May 2002 18:53:53 +0200
- Subject: [xsl] Problem to compare a value with a set of tag content
- Reply-to: xsl-list at lists dot mulberrytech dot com
hello,
i've encountered a problem i can't resolve.
i've got a set of tags like this
<compte>
<pdf>1</pdf>
<pdf>4</pdf>
...
</compte>
<annonce>
<id ="1">
bla bla
</id>
<id ="3">
bla bla
</id>
</annonce>
So, with this structure i would like to scan my "ids" and set a variable
"en-pdf" to true if the "id" is in the pdf value : i will set my
variable to true only for for the id = "1"
I thougth it was possible with nested for-eachs but it doesn't work.
Question 1 : Are nested for-each statements allowed ?
Question 2 :
<xsl:for-each select="annonce">
<xsl:variable name="en-pdf">
<xsl:for-each select="compte/pdf">
<xsl:if test="@id=??????">True</xsl:if>
</xsl:for-each>
</xsl:variable>
i want to use the value of my variable $en-pdf.
</xsl:for-each>
does this block what i want to do ?
is there a better way to make this ?
Thank you for all
Xavier
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list