Sign In/My Account | View Cart  
advertisement

Article:
 XML Namespaces Don't Need URIs
Subject: That won't work
Date: 2005-04-19 03:01:51
From: mikeday
Response to: That won't work

I think it is worth considering alternative methods for disambiguation that do not require giving every element a globally unique name, which in most cases is overkill.


For example, why not use a regular attribute on the root element to identify the "type" of the document, but without needing to propagate that attribute down to the child elements like a namespace. That would allow disambiguation while eliminating the scoping issues.


The different approaches taken to versioning by XSLT 2.0 and XHTML 2.0 are an interesting example. XSLT has a version attribute and keeps the same namespace, while XHTML 2.0 is in an entirely different namespace, even though most of the elements are identical to those in XHTML 1.0.


I think that the approach taken by XSLT is more practical, but as I show in the article XSLT can get by quite happily without any namespace at all. The namespace is only necessary for a process which accepts many different kinds of XML documents whose root element is <xsl:stylesheet> or <xsl:transform> and needs to disambiguate them -- does such a process exist?


No Previous Message Previous Message Move up to Parent Message Up Next Message No Next Message


Full Text Titles Only Newest First

Sponsored By: