[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Summary of critiques of XML Namespace from comments toJame
On 26/07/2021 18:43, Amelia A Lewis wrote: Agreed, colon works nicely too.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. And "encouraged" to be domain name based is probably the best one can hope for. That's a nice feature. And the fact registered short prefixes fits in so neatly with the standard prefixes is very appealing.(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). 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] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|