You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2002/09/13 22:56:09 UTC
DO NOT REPLY [Bug 7976] -
XPathAPI.selectSingleNode() can't select a node relative to a node that is not the document's root
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7976>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7976
XPathAPI.selectSingleNode() can't select a node relative to a node that is not the document's root
ilene@ca.ibm.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From ilene@ca.ibm.com 2002-09-13 20:56 -------
This seems to be working now on 2.4.0.
You should use:
Node node = XPathAPI.selectSingleNode( getNode(), "attribute::algorithm" );
if the context node is encryption-scheme as in your sample below.
Node node = XPathAPI.selectSingleNode( getNode(),
"/encryption-service/encryption-scheme/attribute::algorithm" );
also works because the xpath expression starts with '/' and hence is evaluated
starting at the root.
Node node = XPathAPI.selectSingleNode( getNode(),
"encryption-service/encryption-scheme/attribute::algorithm" );
would not work unless the context node was the root.
Reopen if there still seems to be a problem.