JDOM XPath with datatype casts

[email protected]
Newsgroups gmane.comp.java.jdom.general
Message-ID <OF05AD2F33.AE08778C-ON80257370.00414EC0-80257370.0041CF6E@xansa.com>
Hi,

I'm trying to use a JDOM XPath object to perform the following query on a
document containing a dateTime field.

My xpath string is:

xs:dateTime(@lastTime)-xs:dayTimeDuration('PT0.001S')

and I'm getting an exception at instanciation

org.jdom.JDOMException: Invalid XPath expression:
"xs:dateTime(@lastTime)-xs:dayTimeDuration('PT0.001S')": Unexpected '('

I've tried setting the "xs" namespace, but I can't do this until the XPath
is already instanciated, so that's already too late.

Any suggestions would be appreciated.

Yours,

Clint Redwood
Senior Solutions Architect - Boots Account
t 0115 9595730 (Ext) 725730 (Int)
e [email protected]
e [email protected]
http://www.xansa.com


Whilst this email has been checked for all known viruses, recipients should undertake their own virus checking as Xansa will not accept any liability whatsoever.

This email and any files transmitted with it are confidential and protected by client privilege.  It is solely for the use of the intended recipient.
Please delete it and notify the sender if you have received it in
error. Unauthorised use is prohibited.

Any opinions expressed in this email are those of the individual and not
necessarily the organisation.
     Xansa, Registered Office: 420 Thames Valley Park Drive,
     Thames Valley Park, Reading, RG6 1PU, UK.
     Registered in England No.1000954.
     t  +44 (0)8702 416181
     w  www.xansa.com
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.