Namespaces and XML 2.0 (Was: XML 1.0 in flux)

Sam Hunting wrote:

> [ paul abrahams writes:]
> > Personally, I'd like to see namespaces rolled into the XML spec
> > itself rather than existing in a separate document.  Among other
> > things, that would enable us to avoid the confusing definition of a
> > Qname, which may or may not have a qualifier (a different example of
> > something that quacks like a duck but isn't a duck).  We could then
> > just use "name", with perhaps a "historical note" explaining the
> > previous use of the term Qname for those who hadn't heard the news.
>
> This sounds like XML 2.0 to me (if anyting).
>
> As I understand, the proposal is to replace the XML production:
>
>     [5]  Name ::=  (Letter | '_' | ':') (NameChar)*
>
> with the Namespaces production:
>
>     [6]  QName ::=  (Prefix ':')? LocalPart
>
> where:
>
>     [8]  LocalPart ::=  NCName
>     [4]  NCName ::=  (Letter | '_') (NCNameChar)*

Not quite.  It's to replace [6] by:

  [6]  Name ::=  (Prefix ':')? LocalPart

assuming, of course, that namespaces are rolled into the XML2.0
definition.

> Syntactically, this has the potential to break existing documents,
> since XML 1.0 permits multiple colon characters, hence could be
> characterized as morally problematic. (Of course, a careful reader of
> the XML 1.0 spec would have avoided using namespaces in content
> entirely, given that the recommendation states: <quote>authors should
> not use the colon in XML names except as part of name-space
> experiments</quote>, which mitigates the moral aspect.)

There's a substantive question here: should XML 2.0 forbid names with
more than one colon?  If the answer is no, then namespaces must remain as
a separate specification, I agree.   But even then, since the namespace
spec redefines some other terms, why not redefine Name also as in [6] in
the next namespace spec?

> Semantically, I'm not sure that all authors of XML would wish to adopt
> the Prefix/LocalPart dichotomy. Given our discussions so far...

If namespaces are integrated into XML, then it's hard to avoid that
dichotomy.  Names with colons have a special interpretation in that
case.   If they aren't integrated into XML, your point is valid.

Paul Abrahams

Received on Saturday, 3 June 2000 13:53:41 UTC