Bugs item #1186719, was opened at 2005-04-20 16:42
Message generated for change (Comment added) made by maartenc
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=116035&aid=1186719&group_id=16035

Category: None
Group: None
Status: Closed
Resolution: Wont Fix
Priority: 5
Submitted By: Thomas Fromm (tfromm)
Assigned to: Maarten Coene (maartenc)
Summary: XPath creates Error with 1.6 and works with 1.5.2

Initial Comment:
The following XPath works with 1.5.2.: 
 
/Lookup/MappingTables/[EMAIL PROTECTED]'sdfsdfsd' AND 
@type='XML'] 
 
and with 1.6 i get exception: 
Exception occurred during event dispatching: 
org.dom4j.InvalidXPathException: Invalid XPath  
expression: /Lookup/MappingTables/[EMAIL PROTECTED]'sdfsdfsd' 
AND @type='XML']  
Expected: ] 
        at 
org.dom4j.xpath.DefaultXPath.parse(DefaultXPath.java:360) 
        at 
org.dom4j.xpath.DefaultXPath.<init>(DefaultXPath.java:59) 
        at 
org.dom4j.DocumentFactory.createXPath(DocumentFactory.java:230) 
        at 
org.dom4j.tree.AbstractNode.createXPath(AbstractNode.java:207) 
        at 
org.dom4j.tree.AbstractNode.selectSingleNode(AbstractNode.java:183) 
 
Writing "AND" lowercase works with 1.6. 
 
Maybe writing "AND" lowercase (as works in 1.5.2) is wrong 
XPath, but keeping the logic backward compatible would be 
better i think. 

----------------------------------------------------------------------

>Comment By: Maarten Coene (maartenc)
Date: 2005-04-26 20:39

Message:
Logged In: YES 
user_id=178745

You should be able to use the jaxen jar that comes with
dom4j 1.5.2. No changes were made about the way jaxen is
called...

if not, could you give a more detailled error what's going
wrong when you use the older jaxen.jar

but the best way would be that you change your XPath
expressions so that they are conform to the XPath
specification...

Maarten

----------------------------------------------------------------------

Comment By: Thomas Fromm (tfromm)
Date: 2005-04-26 17:06

Message:
Logged In: YES 
user_id=79402

Its not possible to use older jaxen, because dom4j 1.6 uses stuff from 
newer one than the jaxen version of 1.5.2. 

----------------------------------------------------------------------

Comment By: Maarten Coene (maartenc)
Date: 2005-04-20 20:58

Message:
Logged In: YES 
user_id=178745

dom4j uses jaxen for evaluating xpaths. If you want your 
older xpaths to keep working, you'll have to use an older 
version of jaxen.

regards,
Maarten

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=116035&aid=1186719&group_id=16035


-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
dom4j-dev mailing list
dom4j-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-dev

Reply via email to