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

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
assumption.)

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.

-David

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

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