W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2008

RE: implicit change of default namespace

From: Michael Kay <mike@saxonica.com>
Date: Thu, 28 Feb 2008 08:34:37 -0000
To: "'Ben Liblit'" <liblit@cs.wisc.edu>, <xmlschema-dev@w3.org>
Message-ID: <00c401c879e4$c1991a80$6401a8c0@turtle>

> 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
Received on Thursday, 28 February 2008 08:34:48 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:46 UTC