Subject: Re : Filter by multiple nodes w/ different values
From: Florent Georges <lists@xxxxxxxxxxxx>
Date: Wed, 20 Jan 2010 15:38:24 +0000 (GMT)
|
Sharon_Harris@xxxxxxxxxxxxxxxxxxxx wrote:
Hi,
> I have tried using
for-each w/ multiple conditions and then
> using a value-of statement but that
only produced "true"
> instead of the data (the conditions had been met).
I
haven't looked in the details, but it seems you have
something like:
<xsl:for-each select="'look/like/expression' and '...'">
<xsl:value-of
select="."/>
</xsl:for-each>
So for each item in the expression
"'string' and 'string'", so
build a text node with its string value. An
expression "A and B"
will result in a boolean, so you will everytime build a
text node
with either "false" or "true" as content. Because the effective
boolean value of a non-empty string is always true(), then you
always end up
with "true".
I guess than instead of:
<xsl:for-each select="
'/Row/Portal_Only[text()=$Yes]' and
'Root/Row/Role[text()=$Manager]'">
you want something like:
<xsl:for-each select="
Root/Row/Role[. =
$Manager][/Row/Portal_Only[. = $Yes]]">
I am not sure of the exact intent,
but that would help you as a
first step.
Regards,
--
Florent Georges
http://www.fgeorges.org/
|