[Home] [By Thread] [By Date] [Recent Entries]
On 24 Mar 2009, at 04:29 , Andrew Welch wrote: > 2009/3/23 C. M. Sperberg-McQueen <cmsmcq@b...>: >> >> On 18 Mar 2009, at 04:40 , Andrew Welch wrote: >> >>> Is this considered good practice: >>> >>> http://www.w3.org/TR/xmlschema11-1/#langids > ... > > I think I may have been getting confused - are they namespaces that > will be used in the XSD? Or is it purely to name a spec with a URI, > nothing to do with namespaces, and XML Schema authors won't really > need to know them? They are not namespace names, and I don't expect they will ever appear in schema documents as namespaces or in any other function (except perhaps in schema documents created in an effort to make the preceding statement look foolish). To be precise [ah OOOH ga ah OOOHH ga, pedantry alert! pedantry alert!] they don't name the spec, either, in the sense of naming a document. They name the language, or versions of the language, with various degrees of specificity: XSD, XSD 1.0 vs 1.1, XSD 1.0 First Edition vs. Second Edition, XSD 1.0 First Edition final version vs. various earlier drafts, etc., etc. These versions of the language do tend to correspond to various versions of the spec (natural, since they are defined by different versions of the spec), and for some languages it might be simpler just to use the URI of the spec to denote the language (as a sort of metonym). XSD can't do that, because each version of the language is defined by two normative documents (Structures and Datatypes); the XML Schema WG ran up against this when specifying our test suite and needing ways to distinguish different versions of the language. I have the impression that some implementations may allow the user to specify different behaviors by using the URIs specified at http://www.w3.org/TR/xmlschema11-1/#langids -- but I don't know that for a fact, and I expect that in any such case the documentation will say explicitly which URIs are understood and users will treat them as complicated magic incantations which must be gotten right, on penalty of error messages. (In this regard, there is indeed a strong similarity to namespace names.) > The reason for the question was how to version XML - there doesn't > seem to be an established way at the moment on how to move an > established lump (official collective noun) of XML forward, so that > older processors of the XML can reliably detect the newer XML and > degrade gracefully (or perhaps still process it if the newer XML is > still a subset of the older XML) and new processors can happily > process all versions of the XML without too much implementation > effort. > > I was looking for how XML Schema was going to handle it's transition > from 1.0 to 1.1 and came across the versions and dates in the URIs, > and vc:minVersion and vc:maxVersion... > > I did think that you should: > > - Never ever change the namespace, once you have it stays forever (so > don't use dates or versions in it) > - Use a version attribute on the root element to associate the XML > with a particular schema > > Is that still the case? I think it's still the case that many people believe those rules to be good practice. And they seem to work pretty well for XSLT. I'm not convinced anyone knows enough about how to version things to conclude that these are the only rules that work. Some people I regard as smart are convinced that if you change enough to make it worth calling the new thing a new version, then you've probably changed enough to make it better to change the namespace. But I think you're right that many vocabularies seem to be going the other way. For what it's worth, XSD 1.1 does use the same namespace as XSD 1.0. -- **************************************************************** * C. M. Sperberg-McQueen, Black Mesa Technologies LLC * http://www.blackmesatech.com * http://cmsmcq.com/mib * http://balisage.net ****************************************************************
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |

Cart



