|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Problem to compare a value with a set of tag conte
> the real one is
>
> <liste>
> <compte>
> <pdf>1</pdf>
> <pdf>4</pdf>
> ...
> </compte>
> <annonce id ="1">
> bla bla
> </annonce>
> <annonce id ="2">
> bla bla
> </annonce>
> <annonce id ="3">
> bla bla
> </annonce>
> </liste>
> that why i needed a nested structure.
It doesm't look very nested to me.
Not
<annonce id ="3">
<annonce id ="3.2">
<annonce id ="33.2.1">
.
.
.
> i tried five solutions
But as I said, you don't want this <xsl:for-each select="../compte/pdf">
because otherwise you only set the variable within the scope of the
inner for-each, but your original message indicated that you wanted to
know this value while working on the annonce element.
You just want
<xsl:for-each select="liste/annonce">
<xsl:variable name="en-pdf" select="@id=/liste/compte/pdf"/>
some code ...
<xsl:if test="$en-pdf">
... some code just on teh case that id is in the compte/pdf list
</xsl:if
</xsl:for-each>
David
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








