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

Re: Global/Local attributes


local v global
From: "Simon St.Laurent" <simonstl@s...>
>
> At 09:51 PM 8/1/2002 -0400, Benderjgxd@a... wrote:
> >In a message dated 8/1/2002 8:36:12 PM Central Daylight Time,
> >dareo@m... writes:
> >
> >
> >>What is broken is the existence of a default namespace. Further mangling
> >>Namespaces in XML to accomodate this mistake is unwise and borders on
> >>foolishness.
> >
> >
> >I disagree. What is broken is the possibility of local naming, where any
> >namespaces are used. Or rather, what XML Schema seems to call unqualified
> >names.
>
> That  cuts even closer than Dare's original posting - I'd considered the
> setting of the default namespace to "" when I read his.
>
> Mixing qualified and unqualified seems to be a more fundamental problem
> than whether or not we slap prefixes on things.

So are you saying that if a document uses namespaces, everything in the
document should be qualified (regardless of the prefix issue)?  It seems to
me that Dare's solution would mean that implicitly.  The following XML is
fully qualified:

<elem1 xmlns:x="http://example.com/">
    <x:elem2 x:attr1="" attr1="" />
</elem1>

Obviously, "x:elem2" and "x:attr1" are qualified.  But "elem1" and "attr1"
are qualified at this point as well.  They belong to the "document's
namespace" (goes back the the "local" v. "global" thing I was saying).  The
fact that nothing in the above XML is ambiguous means to me that everything
is qualified (regardless of whether it has a "namespace prefix" attached to
it).

The problem with default namespaces is that ambiquity creeps in when you
also want to use elements/attributes that belong to the document's
namespace.  You have to add rules like "attributes are not in the default
namespace" and "if you encounter an xmlns='', this undoes the default
namespace so that you can have access to the document namespace elements".
And each time we turn around, throw in another caveat to solve some other
discrepancy in the default namespace concept.  By taking out the default
namespace, everything is simplified (and don't we all love simplification)
and we end up with "guaranteed" fully qualified documents at the same time.

---
Seairth Jacobs
seairth@s...


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.