[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Problem to compare a value with a set of tag content

Subject: Problem to compare a value with a set of tag content
From: Xavier DAMAY <xsl.list@xxxxxxxxxxxxxxx>
Date: Wed, 29 May 2002 18:53:53 +0200
set tag contents
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.