Re: two alternatives for namespaces

Don Park (donpark@quake.net)
Tue, 28 Jul 1998 22:28:06 -0700


How about an alternative solution?

Define NamespaceSupport interface which is defined something like this:

public interface NamespaceSupport {
String getBaseName (String fullName);
String getURIName (String fullName);
...
Object getNamespace (String fullName);
String getNamespaceURI (Object nameSpace);
...
boolean equals (String fullName, Object targetNS, String targetName);
...
}

An implementation of NamespaceSupport is retrieved via a method in the
Parser interface:

public interface Parser {
NamespaceSupport getNamespaceSupport();
}

With some polish, it could be very nice, enviro-mentally speaking.

Don Park
CTO/Docuverse