Re: [xsl] Filtering based on "list" of values

Subject: Re: [xsl] Filtering based on "list" of values
From: andrew welch <andrew.j.welch@xxxxxxxxx>
Date: Mon, 9 Jan 2006 10:42:46 +0000
> 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

Current Thread