tags:

views:

62

answers:

1

I'm developing a custom XML schema for communicating data between application components. What do the SO folks consider a good (or, ideally, best) practice for selecting the URI for the namespace? Why?

Some basic consideration:

Our product has many components, and it's probably a good idea if the namespace indicates which component will be consuming it. Beyond that, there's specific types of data. How qualified should I go?

Our business unit has changed ownership a few times, and is likely to do so again. Keeping the company name in the URI is a bit weird, when that happens, but it's not out of the question. Is leaving this in a good idea?

HTTP urls are nice, but we've never had a web server up to get these schema, so divorcing that makes a fair amount of sense. Nonetheless, it seems to be a convention. Is it worth following?

+1  A: 

Yes, it is mostly a matter of taste. Some requirments are not easily compatible (such as resolvability and long-term stability), so try to find out what is most important to you. Nevertheless, a few opinions:

  1. I find it better to have the namespace URI resolve to an actual Web page (for documentation and so on) so it is worth using a "good" (stable, beautiful) domain name.

  2. If you want long-term stability, in presence of name changes and so on, the most lightweight solution, which does not require yet another registry, is the tag URI, standardized in RFC 4151. Just keep in mind they are not resolvable.

bortzmeyer