[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Sibling text() Content Match [was: Re: expression value

Subject: Re: Sibling text() Content Match [was: Re: expression value not a nodeset on content match]
From: Mike Brown <mike@xxxxxxxx>
Date: Thu, 4 May 2000 13:40:01 -0600 (MDT)
michael brown text messages
>  select="record[data_field/*=
> 	contains(., '21 (') and ../*=contains(., '0141-6200')]" />

Hmm, interesting. This might work for your data set but I question it
because you're selecting records for which a very weird test is true.

Consider that contains() returns a boolean. A node-set
compared to a boolean will be true if:
 - the node-set is empty and the boolean is false; or
 - the node-set is not empty and the boolean is true.
Otherwise the comparison will be false and the record won't be selected.

Also, you're still using . instead of text() and thus might accidentally
be looking at all the text in the sub-elements instead of just the
immediate child text nodes for the record element. If one of the
substrings you're looking for can be found further down that branch of the
tree, you'll select the wrong node.

 [gratuitious quoting of previous messages in the thread deleted...]

   - 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.