Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Node-set variable and Contains function Node-set variable and Contains functionTo: NULL Date: 11/5/2004 5:38:00 PM I want to filter my results to only return nodes that contain any one of a
set of strings. I pass in a parameter that contains a node-set and then
filter like this:
<xsl:foreach select="myNode
[
contains(.,msxml:node-set($SearchString)//searchParam[1])
or contains(.,msxml:node-set($SearchString)//searchParam[2])
or contains(.,msxml:node-set($SearchString)//searchParam[3])
or contains(.,msxml:node-set($SearchString)//searchParam[4])
or contains(.,msxml:node-set($SearchString)//searchParam[5])
or contains(.,msxml:node-set($SearchString)//searchParam[6])
or contains(.,msxml:node-set($SearchString)//searchParam[7])
or contains(.,msxml:node-set($SearchString)//searchParam[8])
or contains(.,msxml:node-set($SearchString)//searchParam[9])
or contains(.,msxml:node-set($SearchString)//searchParam[10])
]">
I'd like to come up with a more elegant way of doing this. Right now, I've
hard-coded a limit of 10 searchParam's to search on. I'd like to be able
to search on a dynamic number of searchParam's, depending on the number of
nodes in the parameter. Is there a way to do this?
cheers
-ivan.
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
