You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2006/02/09 09:52:53 UTC
DO NOT REPLY [Bug 38586] New: - Descendant or self axis does not work correctly at root node
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38586>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38586
Summary: Descendant or self axis does not work correctly at root
node
Product: Commons
Version: 1.2 Final
Platform: Other
OS/Version: other
Status: NEW
Severity: major
Priority: P2
Component: JXPath
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: cocoa@gmx.ch
Given the following XML document: <root id="1234"/>
and the XPath: //root/@id/text().
JXPath returns null instead of "1234".
JXPathContext context = JXPathContext.newContext(doc);
assertEquals(value, context.selectSingleNode("//root/@id/text()"));
The attached JUnit test highlights the problem. It seems that JXPath does not
find the root node if it is accessed with the axis descendant-or-self.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
DO NOT REPLY [Bug 38586] - [jxpath] Descendant or self axis does not work correctly at root node
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38586>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38586
------- Additional Comments From joerg.heinicke@gmx.de 2006-02-10 15:33 -------
Just wondering: Does an attribute have a text child node (from a pure XML POV)?
If yes, from a JXPath POV: Might @id/text() be the problem and not the root node?
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
DO NOT REPLY [Bug 38586] - [jxpath] Descendant or self axis does not work correctly at root node
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38586>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38586
------- Additional Comments From sar@gazeta.pl 2007-01-03 15:48 -------
Created an attachment (id=19348)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=19348&action=view)
Path proposal to fix this problem
Adding a patch proposition for this bug.
As written here before, bug actually appears when xpatch is like "//root".
It appears also when a dom is inside any java structure
(for example: map.put("test", new Document(new Element("root"))); xpatch for
"//root" would return null).
Exactly the same bug was both for JDom and Dom; both are fixed.
Modifies 4 files:
main:
JDOMNodePointer.java
DOMNodePointer.java
tests:
JDOMModelTest.java
DOMModelTest.java
This patch is to latest version (2.2?), not to version 1.2.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
DO NOT REPLY [Bug 38586] - Descendant or self axis does not work correctly at root node
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38586>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38586
------- Additional Comments From cocoa@gmx.ch 2006-02-09 09:55 -------
Note, I reproduced that bug using the JDOM model. I have not checked whether it
works in other models.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
DO NOT REPLY [Bug 38586] - [jxpath] Descendant or self axis does not work correctly at root node
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38586>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38586
------- Additional Comments From gudnabrsam@yahoo.com 2007-01-03 15:51 -------
jakarta commons has moved to JIRA. Please add updates at
https://issues.apache.org/jira/browse/JXPATH-12 .
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
DO NOT REPLY [Bug 38586] - [jxpath] Descendant or self axis does not work correctly at root node
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38586>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38586
cocoa@gmx.ch changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Descendant or self axis does|[jxpath] Descendant or self
|not work correctly at root |axis does not work correctly
|node |at root node
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
DO NOT REPLY [Bug 38586] - [jxpath] Descendant or self axis does not work correctly at root node
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38586>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38586
------- Additional Comments From cocoa@gmx.ch 2006-02-11 22:38 -------
Actually, if I'm correct: @id/text() does not make sense from the XML POV. But, the issues is not related to
that particular XPath. It is sufficient to use //root to reproduce the problem. I'm quite confident that the
problem is caused by a bug in JXPath (i.e. incorrect handling of // at the root of the document.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
DO NOT REPLY [Bug 38586] - Descendant or self axis does not work correctly at root node
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38586>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38586
------- Additional Comments From cocoa@gmx.ch 2006-02-09 09:54 -------
Created an attachment (id=17625)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=17625&action=view)
Unit test reproducing the described bug
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org