[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: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 4 May 2000 19:41:32 +0100 (BST)
Re: Sibling text() Content Match [was: Re: expression value
   select="record[data_field/*=
	contains(., '21 (') and ../*=contains(., '0141-6200')]" />

  I guess I thought this was a useful XPath match to send along

ouch:-)

record[data_field/*= 	contains(., '21 (')



contains(., '21 (') will be true or false if the string '21 ('
appears in the string value of record (ie anywhere in the concatenation
of any of the children of record, not just in data_field children)
or you could have '2' in one child, and '1 (' in the next.

data_field/* is a node set valued expression that will be converted to a
boolean as it is used in a boolean context, it is true if the record
element has a data_field child that has a child. (I suspect that this is
always true for your example).
so the = will be true if they are both true or both false, but seing as
the lefthand side is always true, it is true if the substring '21 ('
appears anywhere in the string value. Similarly the other half of the
expression tests for '0141-6200' so I think that your test is
equivalent to
record[contains(., '21 (') and contains(., '0141-6200')]

David


 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.