OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   creating a URI class

[ Lists Home | Date Index | Thread Index ]

In Markup Object Events (MOE) [1], 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
questions.

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

[1] - http://moe.sourceforge.net

-- 
Simon St.Laurent
Ring around the content, a pocket full of brackets
Errors, errors, all fall down!
http://simonstl.com





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS