Google 網路論壇不再支援新的 Usenet 貼文或訂閱項目,但過往內容仍可供查看。

A new, simpler namespace mechanism

瀏覽次數:2 次
跳到第一則未讀訊息

Jonathan Watt

未讀,
2009年11月20日 清晨5:21:592009/11/20
收件者:
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

0 則新訊息