sshyran / genxdm

Automatically exported from code.google.com/p/genxdm
0 stars 0 forks source link

NameSource includes utility methods that are probably inappropriate #7

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Initial (eric) comment:

Some of the "methods" on NameSource really don't belong in an interface, but 
rather as statics in a utility class, as they will never change.

Specifically:

String empty();
boolean isEmpty(String symbol);
boolean isW3cXmlSchemaNamespaceURI(String symbol);
boolean isXmlNamespaceURI(String symbol);
String W3C_XML_SCHEMA_NS_URI();

Note that NameSource is no longer an interface (it's an ABC, renamed from 
NameBridge, a consequence of the removal of the <S>ymbol handle).  It shows up 
in more places than it ought to (legacy of NameBridge); it ought to simply 
provide some of the core XML names and namespaces.

Original issue reported on code.google.com by aale...@gmail.com on 12 Oct 2010 at 4:36

GoogleCodeExporter commented 8 years ago
Most of this has been removed.

The exception is "empty()", which is used far too often (100+ references).

Otherwise, it's no longer a "name source", but a "qname to native type, native 
type to qname" mapper.

This needs more work, at least 100 steps of which will be rather tedious.  Once 
that's done, it probably ought to move into the typed API, where all its 
remaining meaningful methods are associated.

Original comment by aale...@gmail.com on 16 Dec 2010 at 9:11

GoogleCodeExporter commented 8 years ago
Note that we have made some major strides in removing the NameSource infection. 
 Another pass or two might clear it up.

Original comment by aale...@gmail.com on 9 Jun 2011 at 7:31

GoogleCodeExporter commented 8 years ago
fixed as its going to get at r266.  still does nativetype to qname and qname to 
native type mapping; that's all it now does.  there's likely to be a better 
solution for that (a static on native type that maps qname to instances? and a 
non-static method on native type that gives qname?)

Original comment by aale...@gmail.com on 29 Aug 2011 at 7:03