RE: reference to element, elementFormDefault unqualified

Noah, thanks for your prompt reply.

I would be very happy if somebody in the unqualified arena replied to this
email...


Regards,
Leo Antoli


-----Original Message-----
From: noah_mendelsohn@us.ibm.com [mailto:noah_mendelsohn@us.ibm.com] 
Sent: 17 October 2006 17:57
To: Antoli, Leo
Cc: Michael Kay; 'Oliver Kusche'; xmlschema-dev@w3.org
Subject: RE: reference to element, elementFormDefault unqualified


(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

--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------

Received on Wednesday, 18 October 2006 12:05:28 UTC