|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: expression value not a node set on content match
I wrote: > select="record[ @tag='773' > and contains(.,'21 ') > and *[ @code='x' > and contains(.,'0141-6400') ] > ]" I should probably have made that first contains() function look more like contains(text(),'21 '). With contains(.,'21 '), you're testing the string-value of the entire 'record' element, which is going to be the concatenation of all its descendant text nodes, including the ones that are children of the sub-elements. You really only want to test the text node child(ren) of the 'record' element. The same might apply for the sub-element if there is a risk of more elements below. In my code I go to the trouble of specifying text() instead of . more often than not, to avoid any potential ambiguities like this. - Mike ___________________________________________________________ Mike J. Brown, software engineer, Webb Interactive Services XML/XSL stuff: http://www.skew.org/ http://www.webb.net/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








