- From: G. Ken Holman <gkholman@CraneSoftwrights.com>
- Date: Thu, 12 May 2005 19:32:18 -0400
- To: xmlschema-dev@w3.org
At 2005-05-12 09:37 -0500, Eliot Kimber wrote: >Michael Kay wrote: >>>That's my reason for using the namespace with a version. >>> >>>I understand all the stated reasons for not doing this, but out of the >>>box there is nothing else that will consistently and automatically trip >>>up validation if I don't have the "right" file being used to validate my >>>documents. >> >>You might make it easier for the recipient to do validation by including a >>version in the namespace, but you are making it hideously difficult for the >>recipient to process the incoming documents using namespace-aware tools such >>as XSLT and XQuery - as anyone who has tried to write code that handles the >>different flavours of RSS can tell you. > >Yow! I completely forgot about this very practical reason for not >versioning namespaces! This is really much more compelling than any >philosophical argument I could make. > >Mike is 100% correct--any namespace-aware processor, the most obvious >example being XSLTs, may have to be significantly rewritten at the detail >level in order to handle each new variant of the namespace for the same >(abstract) application. Ummmmmm ... wait a minute ... "significantly rewritten"? To accommodate changing namespace URI strings in two of my customers' sites, I just use XML entities: <!DOCTYPE xsl:stylesheet [ <!ENTITY % common-ents SYSTEM "../common.ent"> %common-ents; ]> <xsl:stylesheet ... xmlns:abc="&ns-abc;" ...> ... <xsl:template match="abc:def"> ... And then in a common entity file referenced by all stylesheets, I use: <!ENTITY ns-abc "urn:x-myuri:abc"> All stylesheets in the entire import tree bring in the very same entity file, so all I have to do is change the string in the entity file and all of my read-only stylesheets are up-to-date with the new namespace. In the US intelligence community, different major versions of vocabularies are published with different namespace URI strings and I can implement two copies of a mostly read-only library and accommodate new semantic processing deltas through importation yet preserve former semantic processing of like-named nodes with the new namespace URI. No rewriting at all for unchanged semantics ... hence my challenge of the choice of words "significantly rewritten". Now, this does mean that I have two *deployments* of my stylesheet library, rather than one deployment that handles two different vocabularies, but I accept that because they really are two different vocabularies. And, where processing semantics are the same, shared source-code-control-system modules exported to two different directories act on the two different vocabularies distinguished by the URI strings in their respective common entity files that differ. I'm using this on a daily basis in two customer sites quite successfully. I hope this helps. . . . . . . Ken -- World-wide on-site corporate, govt. & user group XML/XSL training. G. Ken Holman mailto:gkholman@CraneSoftwrights.com Crane Softwrights Ltd. http://www.CraneSoftwrights.com/x/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Breast Cancer Awareness http://www.CraneSoftwrights.com/x/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Received on Thursday, 12 May 2005 23:32:47 UTC