views:

139

answers:

2

I have not developed web services applications that publicly faced the Internet. As I begin to consider the issues of exposing schema definitions to a wide audience, I believe a certain amount of consideration should be spent on properly formatting the schema namespaces.

Has anybody come across a guideline document that advises how to go about standardising the namespace format for an organisation's XML schemas?

things like using FQDNs vs paths http://schemas.organisation.com/ vs http://organisation.com/schemas

styles to include version paths http://organisation.com/schemas/submissions/2006 or http://organisation.com/schemas/submissions/v1

organisation by date or subject matter http://organisation.com/schemas/2006/submissions/ vs http://organisation.com/schemas/submissions/2006

etcetera

12 jan 2010 UPDATE: on revisiting this issue once again i feel it should just be wiki since there cannot be a right answer on this, if ever there are actually any written papers.

+1  A: 

I like using separate domains, but there could be no site there now, or just xml schemas and later on could be a combination of docs and schemas. You probably should NOT include any part of the organisation's structure in either the domain name or URL path, those things change, so try to design it for the longer term.

Finally there is the inevitable versioning question for which dates (yyyy, yyyy-mm, yyyy-mm-dd) or vN are both fine. You should consider whether you want to have a 'symbolic' url for the latest version, and specific dates for particular releases. You can use HTTP redirects from the latest to the particular so that clients can tell what you are doing.

dajobe
Shouldn't schemas be hard versioned? I can imagine a particular client A using a schema http://some.thing.org/schema/essay that was first released in 2005, then in 2006 client B adopts a second release. Now client A and B apps think they have the same technical schema when in fact they don't.
icelava
In W3C XML Schemas the brittle/fixed style of the schema language does tend to force you to hard version but it's not absolutely required if you have blocks of the XML that are open for expansion, they can be forward-compatible and not break when additional elements are added. Tricky but possible.
dajobe
A: 

The closest thing i have read that mentions about how a namespaced ought to be style is this article

http://www.builderau.com.au/strategy/architecture/soa/Good-schema-management-helps-to-maintain-XML-namespace/0,339028264,320273067,00.htm

but it does not hit right on the actual topic per se, merely point out factors that indicate why proper namespacing is important.

icelava