Lists Home |
Date Index |
- From: David Brownell <db@Eng.Sun.COM>
- To: "Simon St.Laurent" <email@example.com>
- Date: Sat, 16 Jan 1999 14:11:48 -0800
"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.
xml-dev: A list for W3C XML Developers. To post, mailto:firstname.lastname@example.org
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:email@example.com the following message;
To subscribe to the digests, mailto:firstname.lastname@example.org the following message;
List coordinator, Henry Rzepa (mailto:email@example.com)