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

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get the 1st element in DTDD




On Fri, 22 Jun 2001, Peter Flynn wrote:

> On Fri, 22 Jun 2001, Murali Mani wrote:
> > Yes, doc should be initialized by an XML document, this is a wierd part of
> > XML, DOCTYPE declaration comes with the XML Document, and you cannot
> > specify DOCTYPE as part of the DTD.
>
> I'm not clear why you'd want to specify it in both places.

I want it only in one place..

> > Other things --
> > I have always *very* strongly felt that the possible root elements of a
> > document should be specified in the DTD/schema -- this is exactly what we
> > do in regular tree grammars.
>
> Conventionally the default root element type would be the one
> element type whose name did *not* appear in any content model,
> and could therefore be assumed to be the root element type,
> which is why many DTD compilers pop up a box after the compile
> to say "this looks like the root element type", please confirm.
>
> But any element type can be the root of a document. There is
> nothing wrong with an XHTML fragment which starts
>
>    <!DOCTYPE p SYSTEM "xhtml-whatever.dtd">
>    <p>...</p>
>
> Or do you want to prohibit this kind of thing and only allow a
> subset of element types to be usable as roots?
>
> ///Peter

If I design something, I will prohibit this -- now how does a validator
know the child elements of the document root element???