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

Namespaces blur (A multi-step approach on definingobject-orientednature


blur meaning
On Thu, 2002-08-22 at 08:21, Jeff Rafter wrote:

> By usual defaults do you mean de facto defaults? The actual defaults are
> both unqualified. The actual defaults create documents that make little or
> no sense from what I have seen because, regardless of the "unqualified"
> setting, the root (because it is global) *must* be:
> 
> <n:name xmlns:n="http://www.example.com">
>   <first/>
>   <second/>
>   <last/>
> </n:name>

Yep and even though I am strongly against such designs, we must
acknowledge that, in practice, namespaces blur...

This is wanted per the namespaces rec for attributes: local
(unqualified) attributes do not have namespace URIs but are considered
to "belong" to the namespace of their parent element and such designs
make it true in a lesser degree for "local elements" (ie elements with
no namespaces) which "meaning" depends on the namespaces (or lack of
namespaces) or their ancestor elements.

If I update your example and consider the namespace
"http://www.example.com" as dark blue:

<n:name xmlns:n="http://www.example.com" local="" n:global>
  <first>
   <second>
    <last/>
   </second>
  </first>
</n:name> 

The "n:global" attribute is dark blue, the "local" attribute just
slighly lighter, and the "first", "second" and "last" elements are
lighter and lighter in a subtle gradient of blue...

The fact is that, independently of namespaces, the meaning of an item in
a tree depends on its position in the tree and namespaces kind of
exarcerbate this fact by their purpose to allow unexpected pieces to be
pasted into well defined vocabularies and also by the differentiation
made between "local" and "global" attributes...

Eric
-- 
Rendez-vous à Paris.
                          http://www.technoforum.fr/integ2002/index.html
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.