W3C home > Mailing lists > Public > www-tag@w3.org > February 2005

Re: Request for new TAG issue: Adding terms to a namespace

From: L. David Baron <dbaron@dbaron.org>
Date: Wed, 9 Feb 2005 14:28:04 -0800
To: www-tag@w3.org
Message-ID: <20050209222804.GA20383@ridley.dbaron.org>
On Wednesday 2005-02-09 15:28 -0500, Norman Walsh wrote:
> Beyond the particular issues of xml:id, the Core WG and the XML CG
> look to the TAG to provide some architectural guidance for the
> maintainance of namespaces in general. Can a working group define
> previously undefined names in a namespace, or is a namespace, once
> published, a closed, immutable set?

A number of standards that depend on markup languages (e.g., CSS
selectors, XPath, DOM) have been designed around the assumption that not
only *may* a working group define previously undefined names, but it
*should* do so rather than copying existing element semantics into a new
namespace.  (Perhaps saying that they're designed around that assumption
is a little strong.  But their usability certainly depends on that

In particular, neither CSS selectors nor XPath provide a mechanism for
easily matching semantically-identical elements in multiple namespaces.
They require spelling the whole thing out, which would make things very
difficult for authors once multiple versions are present.  It's quite
painful for authors to have to write things like:
  [selectors]   svg10|text, svg11|text, svg12|text
  [XPath]       svg10:text or svg11:text or svg12:text
or, even worse:
  [selectors]   svg10|g svg10|text, svg10|g svg11|text, svg10|g svg11|text, 
                svg11|g svg10|text, svg11|g svg11|text, svg11|g svg11|text, 
                svg12|g svg10|text, svg12|g svg11|text, svg12|g svg11|text, 
  [Xpath]       *[(self::svg10:g or self::svg11:g or self::svg12:g)]//
                *[(self::svg10:text or self::svg11:text or self::svg12:text)]
(I'm not much of an XPath expert; there may be a better way of doing that.)

Similar problems exist for a some methods in DOM APIs, such as
Node::getElementsByTagNameNS.  And similar problems certainly exist
within many users of DOM APIs, since using the DOM APIs to answer
questions such as "Is this element and SVG g element?" becomes much
harder.  Code that uses DOM APIs to answer this type of question would
become much more complicated given separate namespaces for each version.


L. David Baron                                <URL: http://dbaron.org/ >

Received on Wednesday, 9 February 2005 22:28:45 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:32:44 UTC