Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
6.3.0
-
None
-
1195eda558 (qt/qttools/dev) 1195eda558 (qt/tqtc-qttools/dev) 1195eda558 (qt/qttools/6.4) 1195eda558 (qt/tqtc-qttools/6.4)
-
DaVinci 56
Description
Links to examples are appended to articles as single paragraphs, even after sections. This is not valid DocBook.
For instance, in qtgui-hellovulkanwidget-example.xml, the end of the file is as follows:
</db:section>
<db:para><db:link xlink:href="https://code.qt.io/cgit/qt/qtbase.git/tree/examples/gui/hellovulkanwidget?h=6.3">Example project @ code.qt.io</db:link></db:para>
</db:article>
The paragraph is not allowed there. Jing yields this validation error:
System ID: D:\Qt\6.3.0\doc_02\qtgui-hellovulkanwidget-example.xml Main validation file: D:\Qt\6.3.0\doc_02\qtgui-hellovulkanwidget-example.xml Scenario name: DocBook 5 Schema: C:\Program Files\Oxygen XML Editor 23\frameworks\docbook\5.1\rng\docbookxi.rng Document type: DocBook 5 - QtDocTools Engine name: Jing Severity: error Problem ID: out_of_context_element Description: element "db:para" not allowed here; expected the element end-tag or element "db:acknowledgements", "db:appendix", "db:bibliography", "db:colophon", "db:dedication", "db:glossary", "db:index", "db:section", "db:simplesect", "db:toc" or "include" (with xmlns="http://www.w3.org/2001/XInclude") Start location: 23:2 End location: 23:9
A correct encoding would be:
<db:section>
<db:title>Example project</db:title>
<db:para><db:link xlink:href="https://code.qt.io/cgit/qt/qtbase.git/tree/examples/gui/hellovulkanwidget?h=6.3">Example project @ code.qt.io</db:link></db:para>
</db:section>
I'm not sure where this code comes from. I think it's https://github.com/dourouc05/qttools/blob/patch-1/src/qdoc/docbookgenerator.cpp#L2214. If so, it would be really easy to fix and I could provide a patch.