[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Xpath AndExpr on attribute values?

Subject: Re: Xpath AndExpr on attribute values?
From: Matt Sergeant <matt@xxxxxxxxxxxx>
Date: Tue, 6 Jun 2000 10:12:16 +0100 (BST)
xpath attribute value
On Tue, 6 Jun 2000, Michael Beddow wrote:

> Can somebody please help me out with the right syntax for an
> Xpath expression that does a logical AND on the values of two
> attributes of the same element? I can get examples strictly
> modelled on Mike K. p 334-335 to work, but they don't cover my
> case.
> Where I have stuff like
> <text>
>  <saying language="en" topic="morals">blah blah blah</saying>
>  ...
> </text>
> I want to do something like
> <xsl:apply-templates select="text/saying[@language='en'] and
> text/saying[@topic='morals']"/>
> but that gives me
> org.apache.xalan.xpath.XPathException: Can not convert #UNKNOWN
> to a NodeList!

text/saying[@language='en' and @topic='morals']

The expression you've used results in a Boolean return value, rather than
a node list.


Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
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.