|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] creating a URI class
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








