OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: Namespaces and DTDs was RE: Namespaces and interoperability (was Re:

[ Lists Home | Date Index | Thread Index ]
  • From: james anderson <James.Anderson@mecomnet.de>
  • To: "xml-dev@ic.ac.uk" <xml-dev@ic.ac.uk>
  • Date: Sun, 07 Feb 1999 15:04:39 +0100

yes, it has been suggested before, and yes it does work. note that, as one is
using the uri-bindings, one does not "use the namespace prefix". 
if the prefixes in the dtd are not identical with those in the document, then
one need only establish scoping rules the bindings effected by attlist

note that the approach is unorthodox. it violates one of the unspoken
namespace tenets: that they do not affect the validity of a document. time
will tell if this holds up.

please note, that your example happens to have an unbound "html" prefix. it is
missing an attlist declaration to the effect of

<!ATTLIST html:p
          xmlns:html CDATA #DEFAULT "urn:aaa" >

i would also suggest that the attlist-based binding is to be preferred to
deferring the disambiguation until the document is read: it does not preclude
alternative prefixes while at the same time making it possible to determine
whether the dtd is complete before beginning to parse/process the document.

Borden, Jonathan wrote:
> James Robertson wrote:
> >
> > If you have a DTD, then namespaces are irrelevant: they simply
> > don't work together in any meaningful way.

The "any" in this statement is in error.

> ...
>         It has been previously discussed that we need to use the namespace prefix
> as declared in the DTD in order to validate XML documents with namespaces.
>         Would explicit declaration of namespace URIs as an attribute allow
> *namespace aware validators* to correctly validate documents in namespace
> URI dependent way as opposed to a prefix dependent way.
>         Use attribute declarations to declare namespaces:
> <!ELEMENT example (a|b|aaa:p|xxx:y)>
> <!ATTLIST example
>                 xmlns:aaa CDATA #DEFAULT "urn:aaa"
>                 xmlns:xxx CDATA #DEFAULT "urn:xxx">
> <!ELEMENT xxx:y (#PCDATA)>
> <!ELEMENT html:p (#PCDATA)>

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS