commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 32360] - [jxpath] Default Namespace not handled correctly
Date Wed, 26 Oct 2005 02:42:19 GMT
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=32360>.
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=32360





------- Additional Comments From dmitri@plotnix.com  2005-10-26 04:42 -------
Let me attempt to summarize the discussion:

1) Per my understanding of the XPath spec and the article by John E. Simpson on 
www.xml.com the current behavior of JXPath is correct.

2) To overcome the issue of no-namespace vs. default namespace, you need to 
register the default namespace explicitly with JXPathContext and use the prefix 
everywhere or, alternatively, use awkward syntax like //*[local-name()
='featureMember'] or //:featureMember (currently unsupported by JXPath).

3) The above solutions being awkward, some people want to see an alternate, if 
non-standard, solution introduced in JXPath.

I think I am starting to lean toward (3). Richard's solution introduces the non-
standard concept of null prefix: in XPath, namespace can be null but a prefix 
cannot. Hmm... Could go along with that, but perhaps a cleaner solution might 
be to add explicit API that would make the bending of the standard more 
explicit, e.g. context.setDefaultNamespaceIgnored(true).  The default behavior 
of JXPath would remain committed to the standard, but those of us who need to 
relax it would be able to explicitly do so.

Should I go ahead with this change?

-- 
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


Mime
View raw message