Re: Allow <info> as root element?
Thomas Schraitle <[email protected]> Thu, 1 Dec 2022 07:30:10 +0100
| Newsgroups | gmane.text.docbook.misc |
|---|---|
| Message-ID | <[email protected]> |
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 an= ymore. > > I'm not sure I understand this. If DocBook is expressed as a DTD, you ca= n > create a document with any element type as the root element type, becaus= e 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 conte= nt model. > [...] > > Or have I missed something? You are right, the _DTD_ cannot define a start element and as such every r= oot 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 th= at's a different story). The official blessed DocBook 5 schema is written in RE= LAX NG (RNG). In RNG you _can_ define start elements. This is what DocBook 5 d= id. However, <info> is not part of that list. In other, more practical words: if you load a file which has <info> has ro= ot element, such a file would be flagged as invalid in your XML editor if you= try to validate it. =2D- Gru=C3=9F/Regards Thomas Schraitle