Re: Can root name in DOCTYPE be a XSD-validity thing?

Just one slightly pedantic footnote:

On Feb 15, 2013, at 4:00 AM, Leif Halvard Silli wrote:

> A doctype such as 
>   <!DOCTYPE TheDocumentElement SYSTEM "ID" [<!--bla, bla-->] >
> allows to verify
> 
>  a) that the DOCTYPE declaration is internally valid, 
>     namely, that its root/document name and the DTD’s definition
>     of the root element type, are matching each others,
>  b) that the root/name part of the DOCTYPE declaration
>     matches the actual root element of the document (except that
> 
> The b) part does not seem technically necessary since this check could 
> even be performed by checking the document/root element against the 
> document/root element definition found in the DTD.

As they are defined by the XML spec, DTDs do not have any
mechanism (other than the name given in the document type
declaration) for identifying a particular element as the document
element in an instance.  It is this which allows a DTD to be used 
to perform structural validation either on a complete document 
(for example, a book or an encyclopedia) or upon individual 
elements which may be stored and managed in separate 
entities (for example, a chapter in a book or an encyclopedia 
entry).

So I don't think the check you have in mind can be performed
solely on the basis of a DTD's internal or external subset -- it
requires the document type declaration.


-- 
****************************************************************
* C. M. Sperberg-McQueen, Black Mesa Technologies LLC
* http://www.blackmesatech.com 
* http://cmsmcq.com/mib                 
* http://balisage.net
****************************************************************

Received on Friday, 15 February 2013 15:16:06 UTC