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


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: Does DTD validation work with namespaces?

[ Lists Home | Date Index | Thread Index ]
  • From: Eric Bohlman <ebohlman@netcom.com>
  • To: tpassin@home.com
  • Date: Wed, 09 Aug 2000 20:03:07 -0700 (PDT)

On Wed, 9 Aug 2000 tpassin@home.com wrote:

> Even then it wouldn't really validate against the original DTD - even if the
> DTD used the prefix 'xxx' - because there is no top-level element <book> as
> called for in the DTD.


> Maybe this is what should happen when a foreign xml structure is included,
> if you are validating.  The processor locates the DTD of the inclusion, but
> builds its syntax starting, not at the start of the DTD, but at the included
> elements(s).  Thus, larger contexts would be thrown away, and only those
> declarations in-scope for the elements of interest would be retained in the
> final syntax.  While we're doing this, we might as well have the DTD
> processor implicitly add on the new prefix(s).

I think you're forgetting that a document type *definition* does *not*
specify a document's root element; it's a document type *declaration* that
does.  Of course, the declaration needs to specify an element defined in
the definition, but that's pretty much it.  So, for example,

<p>This is a paragraph</p>

*is* valid according to the XHTML DTD *if* you tell the processor to treat
<p> as the root element.  Nothing in the XHTML DTD demands that <html> be
the root element; that knowledge comes from outside the DTD itself.


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

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