[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

Subject: Re: expression value not a node set on content match
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 4 May 2000 18:03:39 +0100 (BST)
expression value
You deleted the (needed) and operator that was in the example that you
quoted. 
You have the expression
record[ @tag='773'/*[@code='g' contains(text(),'21 ')
                              ^
                and *[ @code='x'
                       and contains(text(),'0141-6400') 

but the error is where I put the ^.

Inside the [] you have to have a boolean valued expression
(you get the nodes on which the expression evaluates to true.

@code='g'
is the boolean expression returning true on nodes with an
attribute with name code and value g.

contains(text(),'21 ')

is a boolean expression that is true on nodes with a text node
child that contains the substring '21 '

you need to combine those expressions with an operator like and or or
you can't just run them together,

You do use and to connect your third subterm which is

*[ @code='x' and contains(text(),'0141-6400') ]

This is a node set valued term but will coerce to a boolean being true
as long as the node set is non-empty, ie if there is some child of your
record element, such that the child has a code attribute with value x
and character data containing 0141-6400

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.