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=26823>. 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=26823 XPath ignores namespace declarations except on root element Summary: XPath ignores namespace declarations except on root element Product: XalanJ2 Version: 2.0.0 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Major Priority: Other Component: org.apache.xpath AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] By my reading of the XML standards, this document should be valid: <?xml version="1.0"?> <foo:Foo xmlns:foo="http://foo.com"> <bar:Bar xmlns:bar="http://bar.com"/> </foo:Foo> and I should be able to search for //bar:Bar using the XPath implementation in Xalan. However, if I make that search using the ApplyXPath sample, then I get a javax.xml.transformer.Exception saying "Prefix must resolve to a namespace: bar". If I change the XML to this: <?xml version="1.0"?> <foo:Foo xmlns:foo="http://foo.com" xmlns:bar="http://bar.com"> <bar:Bar xmlns:bar="http://bar.com"/> </foo:Foo> then the search works. In the original XML above, I can search for //foo:Foo, but if I wrap the whole structure in a <baz>...</baz> then the search for fooFoo fails. This is v2.5.2, BTW. Your menu of versions in Bugzilla doesn't have that one.
