Allow <info> as root element?
Thomas Schraitle <[email protected]> Sun, 27 Nov 2022 17:56:37 +0100
| Newsgroups | gmane.text.docbook.misc |
|---|---|
| Message-ID | <[email protected]> |
Hi,
currently, DocBook v5.2 (and previous versions) allows several elements as root
element. However, it is currently not possible to use info "alone". Any reasons
why?
Imagine you would like to share some common meta information among several
articles:
----------
<info xmlns="http://docbook.org/ns/docbook" version="5.2">
<publishername>ME</publishername>
<author>
<personname>
<firstname>Tux</firstname>
<surname>Penguin</surname>
</personname>
</author>
<address>
<street>Iceland Road 42</street>
<country>Greenland</country>
</address>
<!-- more, but pruned... -->
</info>
----------
If we save this file as "common-info.xml" it could be xincluded into different
documents.
With the current DocBook v5.2* it's not possible to validate such a file
individually.
With the <info> as root element, it would make several use cases possible:
* Collect some common meta information and share it between different files (as
described above).
* Allow the file to be validated individually. Sure, an info could be embedded
into, let's say, an article. However, this is boilerplate code that could be
avoided.
* In combination with assemblies and topic oriented writing, it might also
be helpful to avoid this restriction.
* Probably more. ;)
What do you think? :)
--
Gruß/Regards
Thomas Schraitle