[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
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
|
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
|