Altova Mailing List Archives


Vocabulary Combination and optional namespaces

From: Joe Gregorio <joe@----------.--->
To: Tim Bray <tbray@----------.--->
Date: 5/29/2003 12:50:00 PM
Tim Bray wrote:
> Arjun Ray wrote:
> 
>> We have it from unimpeachable authority that the Namespace mechanism 
>> isn't
>> really for "vocabulary combination" (even though the "Motivation" section
>> of the spec would seem to suggest that it might be).  Thus in
>>
>>  http://www.xml.com/pub/a/1999/01/namespaces.html
>>
>> it is written: "The only reason namespaces exist, once again, is to give
>> elements and attributes programmer-friendly names that will be unique
>> across the whole Internet."
> 
> 
> Don't be silly.  Why would you want names that are unique on a wide 
> scale if you weren't going to be combining vocabularies?
> 

This brings up something I have run into several times in recent months, that
is, the idea of an "optional namespace" when defining a vocabulary. The
basic idea being that if the document is going to stand alone then no
namespace qualification is needed. If it is going to be combined or contained
in other vocablaries then the namespace is applied. For a concrete
example consider RSS 2.0[1], in which the native RSS elements reside in the nil
namespace:

   <rss version="2.0">
      <channel>
          <title>...

Which is all well and good until you try to embed RSS into another 
vocabulary, for example, SOAP. See [2] for the motivation for this:

<soap:Envelope 
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
  <soap:Header/>
    <soap:Body>   
      <rss version="2.0">
        <channel>
          <title>...

Now this could be solved by declaring an optional namespace for 
RSS 2.0 that could be used in just such a case:

<soap:Envelope 
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:rss2="http://backend.userland.com/rss/"
  <soap:Header/>
    <soap:Body>   
      <rss2:rss version="2.0">
        <rss2:channel>
          <rss2:title>...

I have also run into such a need in other cases, for example
I have worked with a group that is, at best, namespace allergic.
Getting them to place the vocabulary we are working on in a namespace
will be impossible. On the other hand, getting them to agree to an optional
namespace to be used when combining our work other 
vocabularies may be palatable. What are the pros and cons of such
an approach?

	Thanks,
	-joe

[1] http://backend.userland.com/rss/
[2] http://www.intertwingly.net/blog/1354.html

-- 
http://BitWorking.org
http://WellFormedWeb.org

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.