Lists Home |
Date Index |
In Markup Object Events (MOE) , I've thus far used the String class
to hold namespace URIs. I'm seriously considering whether I should go
to the trouble of creating a separate class representing URIs (which
happen to be used as namespace identifiers), but I'm running into some
1) How would I define equality? I can use the containing name class to
perform string-level equality tests (per namespaces in XML), and avoid
defining any notion of equality in the URI class itself, but that feels
a little strained. (This also affects things like hash codes.)
2) Is conversion to URLs (per the Java URL class) apppropriate?
3) What else should such a class do? RDDL support seems like a
reasonably obvious choice given the context, but I'm not sure there's
much more possible.
There are some other tricky issues to worry about, notably making these
things work efficiently, on some kind of interned basis, but that's more
just a programming problem than a deep issue about URIs themselves.
(Though if I created a singleton URI-keeper, that could raise new issues
about the nature of these things.)
 - http://moe.sourceforge.net
Ring around the content, a pocket full of brackets
Errors, errors, all fall down!