[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

creating a URI class


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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.