Lists Home |
Date Index |
- From: Stefan Haustein <email@example.com>
- To: "Roger L. Costello" <firstname.lastname@example.org>, email@example.com
- Date: Wed, 09 Feb 2000 10:28:58 +0100
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">
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
while <xsd:element name="BookCatalogue"> would be expanded to
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.