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/05/14 22:15:14 UTC
DO NOT REPLY [Bug 9081] New: -
Multi-namespace xpath queries not functioning!
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=9081>.
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=9081
Multi-namespace xpath queries not functioning!
Summary: Multi-namespace xpath queries not functioning!
Product: XalanJ2
Version: 2.3
Platform: HP
OS/Version: All
Status: NEW
Severity: Major
Priority: Other
Component: org.apache.xpath
AssignedTo: xalan-dev@xml.apache.org
ReportedBy: fvillarreal@directhitdata.com
When using the ...
public static Node selectSingleNode(Node contextNode,
java.lang.String str,
Node namespaceNode)
or
public static Node selectSingleNode(Node contextNode,
java.lang.String str)
methods of XPathAPI or CachedXPathAPI on a Document object that contains
multiple namespaces ... the method returns null every time!
For instance, take the following markup ...
<?xml version="1.0" encoding="UTF-8"?>
<parent parentId="123">
<parms targetNamespace="http://foo.com/" xmlns="http://foo.com/">
<foo><name>foo</name></foo>
</parms>
</parent>
The following XPathAPI query returns null!
Document doc = DocumentBuilder.parse("pathtofoo.xml");
Element elParent = doc.getDocumentElement();
Element elName = XPathAPI.selectSingeNode(elParent, "parent/foo/name");
i've also tried ...
Element elName = XPathAPI.selectSingeNode(elParent, "parent/foo/name",
elParent);
still returns null! Any clues?