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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook] Allow <info> as root element?


Hi Peter,

On 30.11.22 23:08, Peter Flynn wrote:

I make most or all elements start elements in my DocBook variants
because why not?

That true, this would be possible. However, that wouldn't be DocBook anymore.

I'm not sure I understand this. If DocBook is expressed as a DTD, you can
create a document with any element type as the root element type, because there
is no way in a DTD to say what must or must not be the root element type except
for the one implied by an element type that does not appear in any content model.
[...]

Or have I missed something?

You are right, the _DTD_ cannot define a start element and as such every root
element would be possible. But you miss the point. :-)

The DTD is _not_ not used for DocBook 5 (with the exception of 5.0, but that's
a different story). The official blessed DocBook 5 schema is written in RELAX
NG (RNG). In RNG you _can_ define start elements. This is what DocBook 5 did.
However, <info> is not part of that list.

In other, more practical words: if you load a file which has <info> has root
element, such a file would be flagged as invalid in your XML editor if you try
to validate it.


--
GruÃ/Regards
  Thomas Schraitle



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]