View Single Post
  #4 (permalink)  
Old March 3rd, 2008, 01:06 PM
mhkay's Avatar
mhkay mhkay is offline
Wrox Author
Points: 18,481, Level: 59
Points: 18,481, Level: 59 Points: 18,481, Level: 59 Points: 18,481, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,960
Thanks: 0
Thanked 292 Times in 287 Posts
Default

I'm a bit confused as to your distinction between contains() (meaning "has as a substring") and equals - but perhaps that's a separate problem.

The basic logic seems to be

record[not(Field1 = 'info'])][Field1 = 'all' or *[name()=$searchfield and contains(., $searchtext)]

except that you have to expand the conditions to match text in either case - but you already know how to do that.



Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply With Quote