[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Does DTD validation work with namespaces?

  • From: tpassin@h...
  • To: Eric Bohlman <ebohlman@n...>
  • Date: Thu, 10 Aug 2000 00:16:58 -0400

xhtml dtd validation
Eric Bohlman wrote -

> On Wed, 9 Aug 2000 tpassin@h... 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.
>
> [snip]
>
> > 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.

It depends on what you mean.   If you are validating, the root element must
match the name declared in the DTD.  From the XML Rec, section 2.8:

"Validity Constraint: Root Element Type
The Name in the document type declaration must match the element type of the
root element."

 So a document type declaration **does** in fact require a specific named
root element.  But if you are including an external subset (say, the xhtml
declarations), it's true that the external subset doesn't have to declare a
root.  If that's what you meant, your point is well taken. Thanks.

Regards,

Tom Passin



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.