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]
Other format: [Raw text]

Problem to compare a value with a set of tag content


  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


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