This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Sibling text() Content Match [was: Re: expression value not a nodeset on content match]


>  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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]