This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: expression value not a node set on content match
- To: xsl-list at mulberrytech dot com
- Subject: Re: expression value not a node set on content match
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Thu, 4 May 2000 18:03:39 +0100 (BST)
- References: <Pine.GSO.4.05.10005041230450.4190-100000@jet.cc.emory.edu>
- Reply-To: xsl-list at mulberrytech dot com
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