|
Subject: Re: [xsl] Problem to compare a value with a set of tag content From: David Carlisle <davidc@xxxxxxxxx> Date: Thu, 30 May 2002 10:52:26 +0100 |
> 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
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Problem to compare a valu, Xavier DAMAY | Thread | [xsl] Sum Problem, Kirwan, K. |
| Re: [xsl] Problem to compare a valu, Xavier DAMAY | Date | AW: [xsl] Netscape XSLT ?, Braumuller, Hans |
| Month |