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

Re: Namespaces, W3C XML Schema (was Re: ANN: SAX Filters forNamespacePro

  • From: Ronald Bourret <rpbourret@r...>
  • To: "Fuchs, Matthew" <matthew.fuchs@c...>
  • Date: Fri, 17 Aug 2001 14:59:04 -0700

Re: Namespaces
"Fuchs, Matthew" wrote:
> 
> First, XML Schema allows one to mix and match any number of schemas in a
> single instance.  Each one of those schemas may have associated with it a
> namespace.  One of those schemas is permitted to be unqualified.  I'll say,
> right off the bat, that I think this is a _really_bad_thing_to_do_.
>
> Now, if you don't have any unqualified schemata in a document, then the
> default behavior of elementFormDefault gives the following invariants:
> 
> 1) all top-level elements are always qualified
> 2) all locally declared elements are always unqualified
> 
> >From which one can derive the following hard and fast rule about locally
> scoped elements:
> 
> 3) All unqualified elements are locally declared in the type of the
> immediately enclosing element (modulo inheritance) and therefore cannot be
> confused with any other unqualified element with the same local name
> declared in some other type.

Unfortunately, this is largely akin to saying that prefixes are
significant, which goes against the namespaces spec. In other words,
this reserves the empty prefix for local names. You could just as easily
have reserved the prefix "local:".

I think the real culprit here isn't whether local element type names are
qualified or not. It's that local element types exist at all. In the XML
1.0 specification, element type names are global to documents.
Namespaces made them global across documents -- that is, made them
universal. But local element types make them global only to their
containing element, and that breaks a lot of assumptions we hold about
element type names. Hence the controversy.

My gut tells me that the notion of local element type names also breaks
a certain amount of technology, although my head hurts when I try to
find concrete examples.

(The closest I can come is DocumentFragments in the DOM, which allow
Elements, but not Attributes, as children. That is, Attributes are not
considered to be a valid document fragment in and of themselves and
therefore can't be moved around. One explanation for this is that moving
them without their containing parent loses context, but I'm sure that
considerations of where DocumentFragments can be used in the API also
plays a role.)

-- Ron

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.