xsl-list
[Top] [All Lists]

Re: Filtering based on "list" of values

2006-01-09 03:42:46
Imagine some XML such as...

<root>
    <store location="london">

        <...>report data here</...>

    </store>
[snip]
</root>

I guess I am thinking about passing something into the XSLT (via a
param) along the lines of

        "london,new york"

        or

        "tokyo, paris, london"

How about:

<xsl:apply-templates select="/root/store[contains($param, @location)]"/>

cheers
andrew

--~------------------------------------------------------------------
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>
--~--