RE: implicit change of default namespace

> I've been able to do this 
> in the past using DTDs by giving every HTML element a fixed 
> xmlns="http://www.w3.org/1999/xhtml" attribute.  This can be 
> done easily by redefining an appropriate DTD element which 
> modular XHTML offers as an extension point.
> 
> Is there any way at all to accomplish this using XML Schemas? 

No, and a good thing too. Using defaults in the DTD to put elements in a
namespace that isn't visible to the casual reader of the XML instance is a
source of immense frustration to people trying to process the XML, who fail
to realize what namespace each element is in; it may also mean that the name
of the element changes depending on whether or not you are using a
validating parser.

Every time I answer a question on a public list from an XSLT or XQuery user
who has fallen into this trap and spent days trying to work out what's gone
wrong, I wonder about the mentality of the document designers who led them
into it.

Michael Kay
http://www.saxonica.com/

Received on Thursday, 28 February 2008 08:34:48 UTC