Skip to content

Faulty xml generated when markdown header is too deep. #11016

@ilitzroth

Description

@ilitzroth

Describe the bug
Faulty xml generated when you add markdown header that is too deep:

test.h

/*!
 * \brief BRIEF
 *
 * ### SECT3
 */
class test{
};

Generates this classtest.xml

<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.11.0" xml:lang="en-US">
  <compounddef id="classtest" kind="class" language="C++" prot="public">
    <compoundname>test</compoundname>
    <includes refid="bug1_8h" local="no">bug1.h</includes>
    <briefdescription>
      <para>Encapsulates. </para>
    </briefdescription>
    <detaileddescription>
      <para>blah </para>
      <sect3 id="classtest_1autotoc_md0">
        <title>BLAH</title><para>more blah </para>
      </sect3>
    </detaileddescription>
    <location file="bug1.h" line="9" column="1" bodyfile="bug1.h" bodystart="9" bodyend="10"/>
    <listofallmembers>
    </listofallmembers>
  </compounddef>
</doxygen>

According to the compound.xsd detaileddescription cannot contain a sect3. It is a descriptionType

<xsd:complexType name="descriptionType" mixed="true">
    <xsd:sequence>
      <xsd:element name="title" type="xsd:string" minOccurs="0"/>	    
      <xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" />
      <xsd:element name="internal" type="docInternalType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="sect1" type="docSect1Type" minOccurs="0" maxOccurs="unbounded" />
    </xsd:sequence>
  </xsd:complexType>

To Reproduce
Run the provided header file through doxygen with

MARKDOWN_SUPPORT       = YES
GENERATE_XML = YES

Expected behavior
A valid xml with respect to compound.xml is produced.

Version
1.11.0

Additional context
trying to generate texinfo from the xml output of doxygen with xsd: https://www.codesynthesis.com/projects/xsd/
This comes from trying to run thirdparty headers through doxygen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    MarkdownMarkdown translation input related issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions