Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: reference to element, elementFormDefault unqualified

From: noah_mendelsohn@--.---.---
To: "Antoli, Leo" <Leo.Antoli@-----.--->
Date: 10/17/2006 8:57:00 AM
(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
--------------------------------------





From boris@k... Wed Oct 18 06:16:24 2006
Received: from lisa.w3.org ([128.30.52.41])
	by fri


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent