HowardMarks
MIS
Hi guys,
I'm creating a search facility in xslt for my xml based site.
I pass the search terms to the xml by creating nodes called <searchterm> in the root of the xml. There can be any number of search terms.
I'm using the contains() function to search the xml for the terms provided. I have created the 'Search any word' and 'search exact phrase' options pretty easily, but i'm having trouble creating the 'search all words'(in any order).
I need to check all instances of //Root/Company/NewItem to see whether they contain all of the //Root/SearchTerm nodes. If a news item contains all of the search terms, in any order, i need to display it.
I can't figure out the logic to loop both the search terms and the news items, which would be pretty simple if only i could change the value of a variable as in asp.
Any suggestions would be greatly appreciated.
Thanks guys
I need to
Nick (Software Developer)
nick@retrographics.fsnet.co.uk
nick.price@myenable.com
I'm creating a search facility in xslt for my xml based site.
I pass the search terms to the xml by creating nodes called <searchterm> in the root of the xml. There can be any number of search terms.
I'm using the contains() function to search the xml for the terms provided. I have created the 'Search any word' and 'search exact phrase' options pretty easily, but i'm having trouble creating the 'search all words'(in any order).
I need to check all instances of //Root/Company/NewItem to see whether they contain all of the //Root/SearchTerm nodes. If a news item contains all of the search terms, in any order, i need to display it.
I can't figure out the logic to loop both the search terms and the news items, which would be pretty simple if only i could change the value of a variable as in asp.
Any suggestions would be greatly appreciated.
Thanks guys
I need to
Nick (Software Developer)
nick@retrographics.fsnet.co.uk
nick.price@myenable.com