Re: Does DTD validation work with namespaces?
by other posts by this author
Aug 10 2000 4:16AM messages near this date
Re: Does DTD validation work with namespaces?
|
Re: Why the Infoset?
Eric Bohlman wrote -
> On Wed, 9 Aug 2000 tpassin@[...].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.
>
> [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
Thread:
Paul W. Abrahams
Rick JELLIFFE
W. E. Perry
Jonathan Borden
Simon St.Laurent
Jonathan Borden
Simon St.Laurent
John F. Schlesinger
Jonathan Borden
Simon St.Laurent
W. E. Perry
John Cowan
Rick JELLIFFE
Rick JELLIFFE
Sean McGrath
Simon St.Laurent
Jonathan Borden
Sean McGrath
Rick JELLIFFE
Rick JELLIFFE
Simon St.Laurent
James Robertson
Simon St.Laurent
Jonathan Borden
Simon St.Laurent
Paul W. Abrahams
Jonathan Borden
Paul W. Abrahams
Rick JELLIFFE
Dan Vint
Rick JELLIFFE
Marcus Carr
Michael Champion
John Cowan
John Cowan
John Cowan
Michael Champion
Winchel 'Todd' Vincent, III
John Cowan
Jonathan Borden
sam th
Jonathan Borden
Simon St.Laurent
John Cowan
John Cowan
John Cowan
Simon St.Laurent
Richard Lanyon
John Cowan
Jonathan Borden
John Cowan
Simon St.Laurent
John Cowan
Jonathan Borden
Rick JELLIFFE
james anderson
Winchel 'Todd' Vincent, III
Winchel 'Todd' Vincent, III
Rick JELLIFFE
Norman Walsh
Jonathan Borden
Winchel 'Todd' Vincent, III
Jonathan Borden
Norman Walsh
Winchel 'Todd' Vincent, III
Amy Lewis
Eric Bohlman
John Cowan
Simon St.Laurent
Jeff Greif
Jonathan Borden
Elliotte Rusty Harold
Sean McGrath
Simon St.Laurent
Joe English
Simon St.Laurent
Jonathan Borden
Simon St.Laurent
W. E. Perry
Jonathan Borden
John Cowan
John Cowan
Sean McGrath
W. E. Perry
John F. Schlesinger
Sean McGrath
Michael Champion
Michael Champion
Paul W. Abrahams
John Cowan
Paul W. Abrahams
Paul W. Abrahams
Simon St.Laurent
Martin Gudgin
Jonathan Borden
Simon St.Laurent
Tim Bray
Jonathan Borden
Jack Rusher
Steve Rowe
|