Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Best Practices for Establishing Namespace Name

From: Andrew Welch <andrew.j.welch@-----.--->
To: Simon Cox <simon.cox@---.--.------.-->
Date: 9/2/2009 5:19:00 PM
2009/9/2 Simon Cox <simon.cox@j...>:
>  Andrew Welch wrote
>> use a version attribute to distinguish the versions
>
> Where?

Typically on the root element, but it could go anywhere that's suitable.

> The issue was that elements with the same name were defined differently in
> both GML 2.0 and GML 3.0,
> But they had the same target namespace. The differences were subtle -
> technical rather than conceptual - but real as far as a validating processor
> is concerned. The XML namespace is to all practical intents and purposes the
> designated identifier for 'the schema' and we had the same identifier for
> different things. Chaos ensues.

Between versions the content model of elements will change, but that
doesn't mean you need a different namespace... Incompatible changes
are actually easier than supporting backwards compatibility, instead
of detecting the version and using the right xsd and corresponding
parsing code, you simply reject anything that fails validation for
that version.

Anyway, it's interesting that you say the namespace is (to all intents
ands purposes) the identifier for the schema, perhaps that's where the
problem is... the namespace value itself has started to mean
something, when its meant to mean nothing.

Everyone seems to have different opinions on this, and I think Ive
asked in the past if anyone has a best practices guide which didnt
attract too many confident replies, but at the moment for me its
simply "namespace that won't ever change, version attribute" : )




-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent