XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Summary of critiques of XML Namespace from comments toJames Clark 2010 blog

On 26/07/2021 18:43, Amelia A Lewis wrote:
Since this would be incompatible with XML+Namespaces-in-XML anyway, use
colon instead of dot as your delimiter:

<com:example:myvocabulary:top>
     <middle />
</com:example:myvocabulary:top>

which would be equivalent to:

<com:example:myvocabulary:top>
     <com:example:myvocabulary:middle />
</com:example:myvocabulary:top>

This also helps to underscore that while domain names guarantee (FSDO
"guarantee") uniqueness, it is not required that the namespace part of
the name be a domain name, just that it be probably-unique. The abuse
of the colon also helps to immediately identify this as
not-XML+Namespaces-in-XML.
Agreed, colon works nicely too.

And "encouraged" to be domain name based is probably the best one can hope for.

(For a new syntax you could even say that an end tag adopts the
namespace of its start tag if it is not fully qualified, for example:

<com:example:myvocabulary:top>
     <middle />
</top>

That last bit is a nice touch. When manually writing XML, forgetting to
prefix the end tag is my most common typing error.

The syntax, using both forms of minimization, produces a much higher
signal:noise ratio for a single-namespace document than XML with a
namespace bound to a non-default prefix (granted that it's only a
slight improvement over the equivalent single-namespace document bound
to the default prefix). That benefit increases as additional namespaces
are added (as a rule, documents containing foreign-namespace elements
contain those elements in single-namespace blocks, in my experience).

Global attributes are equally simple. Importantly, I think, the current
syntax for (global) attributes from namespaces with reserved prefixes
can be preserved here: xml:id, xml:base, xml:lang, xsi:type, but these
reserved short prefixes (as they are now) become reserved short
namespaces. For that matter, W3C could fund itself (a little) by
selling a registry service for well-known single-part namespaces
(canonically, domain names contain a minimum of two parts, so all
single-part namespaces are potentially administratively controllable by
a single entity).
That's a nice feature. And the fact registered short prefixes fits in so neatly with the standard prefixes is very appealing.

Pete.
--
---------------------------------------------------------------------
Pete Cordell
Codalogic Ltd
Read & write XML in C++, http://www.xml2cpp.com
---------------------------------------------------------------------




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS