[Home] [By Thread] [By Date] [Recent Entries]

  • From: Amelia A Lewis <amyzing@t...>
  • To: Pete Cordell <pete++xmldev@c...>
  • Date: Mon, 26 Jul 2021 13:43:27 -0400

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.

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

Amy!
-- 
Amelia A. Lewis                    amyzing {at} talsever.com
A hundred thousand lemmings can't be wrong.


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


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member