[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Vocabulary Combination and optional namespaces

english vocablaries
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

   <rss version="2.0">

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:

      <rss version="2.0">

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

      <rss2:rss version="2.0">

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?


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



Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.

Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.