OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Vocabulary Combination and optional namespaces

[ Lists Home | Date Index | Thread Index ]

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






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS