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

implicit change of default namespace

From: Ben Liblit <liblit@cs.wisc.edu>
Date: Wed, 27 Feb 2008 16:38:28 -0600
Message-ID: <47C5E664.6020306@cs.wisc.edu>
To: xmlschema-dev@w3.org

I am trying to formalize a family of documents which use a local, custom 
structure at and near the document root, but which eventually use XHTML 
block elements further down.  For example:





I know that I could make either "http://example.com/my" or 
"http://www.w3.org/1999/xhtml" a default namespace and then omit the 
"my:" or "html:" prefixes on element tags.  However, what I'd really 
like to do is omit *both* namespace prefixes, while still avoiding any 
xmlns="..." attributes on elements below the root:

	<root ...>




There is no overlap in element names between the two namespaces, so 
there ought to be an unambiguous interpretation of this document.  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.

However, I cannot figure out how to do this using XML Schemas.  I've 
found a similar modular XHTML extension point: it is the 
xhtml.Core.extra.attrib named attribute group, which could be redefined 
to give every XHTML element additional attributes.  But my validator 
explicitly forbids using this to define an "xmlns" attribute.

Is there any way at all to accomplish this using XML Schemas?  Or will I 
be forced to use either namespace prefixes or xmlns="..." attributes 
whenever I want to change default namespaces?

Received on Thursday, 28 February 2008 02:56:04 UTC

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