xsl-list
[Top] [All Lists]

[xsl] Re : [xsl] Filter by multiple nodes w/ different values

2010-01-20 09:38:55
Sharon_Harris(_at_)ultimatesoftware(_dot_)com 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/























      


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>