Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-103749

DocBook examples: paragraphs outside

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 6.4.0 Beta1
    • 6.3.0
    • Build tools: qdoc
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            docinfrastructure Documentation Infrastructure Team
            dourouc05_ Thibaut Cuvelier
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes