OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: The per-element-type namespace partition

[ Lists Home | Date Index | Thread Index ]
  • From: Tim Bray <tbray@textuality.com>
  • To: Joe Lapp <jlapp@webMethods.com>, xml-dev@ic.ac.uk
  • Date: Mon, 20 Dec 1999 10:05:14 -0800

At 12:16 PM 12/20/99 -0500, Joe Lapp wrote:
> What will I break if I effectively lump all per-element-type attributes 
>into a single universal "default" namespace and require applications that 
>need this information to retain information about the elements to which such 
>attributes belong?  Why didn't the W3C just allow an unqualified attribute 
>to assume the namespace of its owning element?  And what am I to infer from 
>the fact that the "per-element-type partition" is defined in a "non-
>normative" section of the Namespaces in XML specification?

The key question that took up literally months of the WG's time was, what
about the following two elements:

<html:a href="foo">
<html:a html:href="foo">

The question was, are these two

(a) the same in all cases
(b) never the same thing
(c) sometimes the same

(a) is probably the most common case, and what you're proposing doing.
But at the end of the day, the WG simply couldn't bring itself to decree
that they must always be the same.  Another way to ask the same question
is: in <html:a href="foo">, what namespace is href in?  The fuzzy, 
non-precise answer that kept coming up was "it's in the namespace of
the <html:a> element".  That sounded good to everyone but it was hard
to understand at a programmer-level term just what it meant.

So the language in the spec allows the pair of examples to be treated
as non-equivalent by an app that wants to do so.  The non-normative
appendix tries to make the notion of "the namespace of an element"
useful.

To get back to your question, I'm unconvinced that you have a problem.
If you're going to extract an attribute from a doc and do things
with it, you probably want to remember what element type it came
from anyhow.  Element types have two parts and that's all there is to it.
At some point you're going to have to deal with
<html:a xlink:role="foo"> anyhow; that attribute has potentially 4
pieces of identifying information and there's no getting away from it.
 -Tim

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS