TIBCOSoftware / genxdm

GenXDM: XQuery/XPath Data Model API, bridges, and processors for tree-model neutral access to XML.
http://www.genxdm.org/
9 stars 4 forks source link

Consider replacing all the different namespace/prefix resolvers with javax.xml.namespace.NamespaceContext #109

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
*Why* we insist on producing dozens of barely-divergent interfaces and 
implementations for this, I do not understand.

Recommended: in org.genxdm.names, add an extension of NamespaceContext that 
adds the getPrefix() method from NamespaceResolver (if we *really* need it; 
it's only used in TypesBridge and the implementation). Probably the best thing 
is to change PrefixResolver to extend javax.xml.namespace.NamespaceContext, 
although better still would be to utterly destroy both of these interfaces and 
just use what we have in the JDK. PrefixResolver's single method exactly 
matches the method in the JDK, except that according to the JDK javadoc, an 
unbound prefix returns "", not null as our javadoc mandates.

Perhaps this ought to be listed as low priority, but it's annoying me, at the 
moment. We have two different implementations of PrefixResolver in the schema 
parser, and still another implementation in the validator.

Original issue reported on code.google.com by aale...@gmail.com on 26 Oct 2012 at 5:33

GoogleCodeExporter commented 9 years ago
Maybe stating the obvious here but please make sure that we maintain the 
semantics of the javax.xml.namespace.NamespaceContext interface.

As to "why" -- consider that Java's interface was only introduced in 1.5 and I 
remember some religious wars wrt to returning null for namespace lookups :-)

Original comment by anli.shu...@gmail.com on 26 Oct 2012 at 7:23

GoogleCodeExporter commented 9 years ago
Assigned to release 1.0

Original comment by eric%tib...@gtempaccount.com on 1 Nov 2012 at 7:02

GoogleCodeExporter commented 9 years ago
Defer to 1.1

Original comment by aale...@gmail.com on 24 Oct 2013 at 5:22