XML.com: XML Namespaces Don't Need URIs
Frightening. XML.com is the premier XML newssite on the web. Plus it's an O'Reilly site so you expect a certain pedigree to it's content. Instead you get this: XML.com: XML Namespaces Don't Need URIs. This article starts off from the fairly reasonable standpoint that namespace URI's (the mechanism in XML that is used to disambiguate elements and more importantly their corresponding values from different XML Schemas (grammars)) are ugly and unwieldy. Fair enough, I don't think you'll find too many people disagreeing.
Namespace URI's work by allowing you to prefix any XML element or value with a token, e.g. for XSL you would use the "xsl" prefix e.g.
The article then argues that URI's are the wrong sort of namespace declaration. Again a reasonable point when compared with say a programming package declaration, e.g. org.w3c.xml. More readable certainly, but not semantically different.
Then it loses the plot and says hey we don't really need namepace declarations, prefixes are enough, providing we all choose reasonable prefixes. I'm sorry they aren't. While I'm no fan of namespace handling. In it's current form it makes processing XML documents a real pain in the ass. However, something like namespaces is still required. Otherwise we need a registry of known prefix types. For prefix clashes, it seems to suggest using aliases, but this is equivalent to namespace URI's anyway.
xmlns:xxx="http://www.xxx.sss/"


0 Comments:
Post a Comment
<< Home