Identifying XML Document Types (was XML media types revisited)

David Brownell db at Eng.Sun.COM
Sat Jan 16 23:14:22 GMT 1999

"Simon St.Laurent" wrote:
>  ... naming and otherwise identifying elements and documents ...
> 4) Root elements using Namespaces - A new possibility that gained some
> prominence with the accession to W3C Recommendation of 'Namespaces in XML'.
> Advantages: Namespaces ensure unique element names, making it less likely
> that you have someone else's DOCUMENT element.
> Disadvantages: Just because the root element is X doesn't mean its contents
> are Y. Especially given the problems of validating documents in
> namespace-aware environments, namespaces may not always be available. 

If you're using XML namespaces with a validating parser, just make
sure each element has #FIXED "xmlns*" attributes and stick to the
constraints of your content model, and you're fine ... living with
the same DTD-derived restrictions you always had.

> Because namespaces aren't supposed to point to anything, you can't sneak a
> DTD in at the URL identified by the namespace.

Yet the specification for a _specific_ namespace can easily say that
the namespace URI is a URL holding data in some format ("schema").

All the namespace spec defines is that it's an identifier, used to
make the XML document be more self-descriptive; but any particular
namespace could define more than that, as part of its application

> Recurring Question: So how do I make this work reliably in a validating
> environment?  (Recurring answer: Ask again next year, please.)

There's another recurring answer, "it works just fine, even when you
want to validate, so what's the confusion?".

What's not fully understood is how to mix elements from different
namespaces under control of a _new and unspecified_ validity model.
Re what such models "ought to" be like ... ask again next year!  And
meanwhile, remember that namespaces work fine with today's models.

- Dave

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as:
To (un)subscribe, mailto:majordomo at the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list