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

RE: XPath problem

Subject: RE: XPath problem
From: <Jarno.Elovirta@xxxxxxxxx>
Date: Thu, 27 Jan 2005 10:06:06 +0200
xqx
Hi,

> I am trying to use a very fancy XPath with Dom4J, but
> something is wrong with my string.  Here it is:
>
> /rr:ReportRequest/xqx:whereClause/*/xqx:expr[xsi:type
> = 'operatorExpr' and xqx:opType = '&lt;=' and
> xqx:parameters/xqx:expr[1]/xqx:value =
> 'DateMisplaced']/xqx:parameters/xqx:expr[2]/xqx:value

Looks ok syntax-wise.

> There seem to be at least two problems with this
> string.
>
> The first is that it doesn't seem to like the "*",
> which seems strange to me.  It will find:
>
> /rr:ReportRequest/xqx:whereClause
>
> but not
>
> /rr:ReportRequest/xqx:whereClause/*/xqx:expr

Does you source tree contain an xqx:expr element at that location?

> The second problem is that it does not like:
>
> xqx:opType = '&lt;='
>
> Is there a problem with this?  The element text
> contains the string "&lt;=".  But the match does not
> work.

The equality operator in this case tests whether there is a xqx:opType child
whose string value is "<=". Use contains() function if you want to check is a
xqx:opType child contains "<=" in it's string value.

Cheers,

Jarno

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.