Re: Finding Any Occurrance
We need to know more....
At 01:31 PM 9/1/2006, you wrote:
I have (successfully!) pulled some content from an outside file (and hidden it in the variable $matcher). I now want to look through my input file to see if that content is in any <title> child, anywhere, so I know if it's worth carrying on processing for this content. But
By "that content is in any title child, anywhere", do you mean the string value of $matcher equals the string value of any title? Your equality test should check that.
If you mean "the value of matcher is a substring of the value of any title anywhere", you'll have to be more creative:
tests true if there exists any title node whose string value contains the string value of $matcher.
Remember that whitespace in your title values, or in $matcher, can throw this off too ... in which case the normalize-space() function comes to the rescue.
Ask again if this isn't enough to get you there.
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format