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

Re: XML Schema Question: default namespace misses attributes

  • From: Stefan Haustein <haustein@k...>
  • To: "Roger L. Costello" <costello@m...>, xml-dev@x...
  • Date: Wed, 09 Feb 2000 10:28:58 +0100

xsd default namespace
Roger L.Costello wrote:
>
> Wouldn't it be better if, as is done in the XSLT spec, we don't use a
> default namespace and, instead, explicitly qualify all elements and
> attributes?  Using such an approach, the above example can be recast as:
> 
> <xsd:schema xmlns:xsd="http://www.w3.org/1999/XMLSchema" ...>
>     <xsd:element xsd:name="BookCatalogue">
>          ...
>     </xsd:element>
>     ...
> </xsd:schema>

The problem is that it makes a difference whether an attribute has 
a namespace or no namespace at all. The intention is probably to 
distinguish between namespace-global attributes that can occur in 
every element like xml:lang and attributes local to an element. 
Maybe the rationale behind that is that element-local attributes 
can have different meanings depending on the element, and 
may have no senseful meaning on their own. Putting
them in a global namespace would make look them more 
"global" than they are.

So, <xsd:element xsd:name="BookCatalogue"> would be expanded to

<{http://www.w3.org/1999/XMLSchema}element
{http://www.w3.org/1999/XMLSchema}name="BookCatalogue">

while <xsd:element name="BookCatalogue"> would be expanded to

<{http://www.w3.org/1999/XMLSchema}element {}name="BookCatalogue">

However, when you define the specs for a concrete XML application,
you are free to ignore the difference by regarding both cases
equal. I do not like the idea to of having namespaces for attributes 
very much because it seems to cause more confusion than benefit. 
Personally, I would prefer if the attributes' namespace would always 
default to the element's namespace.  

Best regards

Stefan

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.