A new, simpler namespace mechanism

Jonathan Watt <[email protected]> Fri, 20 Nov 2009 11:21:59 +0100
Newsgroups gmane.comp.mozilla.devel.xml
Message-ID <[email protected]>
One of the complaints about XML namespaces that I agree with is that they are a
pain to write, and easy to get wrong. What if things were as simple as this:

<html>
  <body>
    <svg::svg width="100" height="100">
      <circle .../>
    </svg>
  </body>
</html>

The double colon "::" would be different to the single colon in that it would be
sticky - descendants would be put into the same namespace without the need to
prefix them too.

The W3C would maintain a registry of *default* namespace prefix bindings, kind
of like how there's a registry of content-types now.

No need to specify an (the "xmlns") attribute - it's much easier to write a
prefix, and much much easier to remember a simple prefix than a dated URI.

No need to prefix the closing </svg> tag (what's the point?).

Any existing XML content that binds a prefix to a namespace other than W3C's
default would continue to work in new parsers, since their binding declarations
would override the W3C's defaults.

Jonathan