[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: Mike Brown <mike@xxxxxxxx>
Date: Wed, 3 May 2000 16:59:32 -0600 (MDT)
not a node set
> and I only want ot pull out those few <record>'s with given content in
> data-field[@tag='773']/subfield[@code='g'] --in other words a
> record with text string 0000-1234 in subfield[@code='g'] of
> data-field[@[tag='773'] ALONG WITH a test string of say "21 " (note the
> space- do I use &#?) in subfield[@code='x'] of same datafield[@tag='773']
> in that record, what gives?  I'm using 
>
> <xsl:apply-templates select="record[*[@tag='773']/*[@code='g'
> [contains(., '21 ')]] 
> and record[*[@tag='773']/*[@code='x'
> [contains(., '0141-6400')]]"/>

It is complaining because you are putting a predicate -- something, i.e.
contains(., 'foo'), in brackets -- after what is either a string object
('g') or a boolean object (@code='g'), but a predicate is something that
can only modify a node-set.

Try something like this (copious whitespace only here for clarity):

select="record[ @tag='773'
                and contains(.,'21 ')
                and *[ @code='x'
                       and contains(.,'0141-6400') ]
              ]"

As for the space in the 21, it doesn't matter if you use a literal
character or a numeric character reference. If it's a regular space just
type a regular space from your keyboard. If it's a non-breaking space you
can probably use a keyboard trick to produce that character (alt-0160 on
NT, for example), or you could use &#160;.

   - 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


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.