W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2006

RE: reference to element, elementFormDefault unqualified

From: <noah_mendelsohn@us.ibm.com>
Date: Tue, 17 Oct 2006 12:56:55 -0400
To: "Antoli, Leo" <Leo.Antoli@Misys.com>
Cc: Michael Kay <mike@saxonica.com>, "'Oliver Kusche'" <oli@trip.net>, xmlschema-dev@w3.org
Message-ID: <OFAFD002C6.C447BB0D-ON8525720A.005C5D23-8525720A.005D1B5F@lotus.com>

(Note that this reply is to schema-dev only, as I normally don't subscribe 
to xml-dev and thus can't post there.  In general, I suggest we avoid 
cross posting for discussions like this.  Anyway...)

Leo Antoli

> Are there good reasons to use it? Are there good reasons to avoid it?

I'm not sure I'd be prepared to advocate it, but I believe I can explain 
why at least some WG members wanted to use local elements without 
namespaces.  The arguments I've heard include:

* It's parallel to attributes.  Attributes in XML are provably scoped 
locally to their parent elements.  You can tell because you can have 
different default values for attribute A, for example, on differently 
named elements.  Typically in XML, such attributes are unqualified. 
Furthermore, then namespaces recommendation encourages such usage, but 
setting a rule that default namespaces apply to elements, but not 
attributes.  In short, this view holds that attributes are the abstraction 
we've always known in XML that are locally scoped, and they are almost 
always unqualified;  thus, when we introduce a similar local scoping for 
elements, those too should be unqualified.

* A related view is more philosphical.  There is a point of view that a 
qualified name in some sense promises greater uniqueness, and has more 
standing on the web, than a naked unqualified names.  So, if I tell you I 
have an element named <title>, you're pretty sure there will be lots of 
other uses of the tag for different purposes.  Once I ground an element 
name on the web by making it the expanded name 
{http://example.org/standardBiblioTerms, title}, then you might expect the 
term to be used consistently everywhere.  In fact, local scoping exists 
specifically to make it possible to give different uses to the same tag, 
and so use of qualified names is inappropriate.

I mostly don't find the above arguments compelling, but there are a number 
of very smart and well informed people who do.  I mostly use qualified 
locals, when I use locals at all (and, FWIW, except for the fact that our 
syntax makes locals more convenient than globals, I think most uses of 
locals are unfortunate and unnecessary.)  The XML schema wg probably spent 
more time trying to get this right than they did on any other Schema 1.0 
issue.  In the end, there were strong adherents to both idioms, and so the 
mechanisms were introduced to let each "camp" set their preferred default.


Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
Received on Tuesday, 17 October 2006 16:57:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:37 UTC