Skip to content

Commit

Permalink
Provide page brief in <briefdescription> of XML output.
Browse files Browse the repository at this point in the history
Until now the brief description of pages was prepended to the
<detaileddescription> element and the <briefdescription> element was
not present at all, which meant there was no easy way to extract the
brief description for purposes of creating a page index, for example.

With this patch, the brief description is included in both
<briefdescription> and <detaileddescription>, thus duplicated, to
avoid backwards compatibility issues.
  • Loading branch information
mosra committed Nov 25, 2017
1 parent 4f45bd2 commit bd2cf98
Show file tree
Hide file tree
Showing 43 changed files with 89 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/xmlgen.cpp
Expand Up @@ -1825,6 +1825,9 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample)
}
}
writeInnerPages(pd->getSubPages(),t);
t << " <briefdescription>" << endl;
writeXMLDocBlock(t,pd->briefFile(),pd->briefLine(),pd,0,pd->briefDescription());
t << " </briefdescription>" << endl;
t << " <detaileddescription>" << endl;
if (isExample)
{
Expand Down
2 changes: 2 additions & 0 deletions testing/001/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>Text <emphasis>argument</emphasis> more text. </para>
</detaileddescription>
Expand Down
2 changes: 2 additions & 0 deletions testing/002/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>
<indexentry>
Expand Down
2 changes: 2 additions & 0 deletions testing/003/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para><ref refid="index_1myanchor" kindref="member">See Anchor</ref> Some text. <anchor id="index_1myanchor"/>More text. </para>
</detaileddescription>
Expand Down
2 changes: 2 additions & 0 deletions testing/004/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para><itemizedlist><listitem><para><computeroutput>AlignLeft</computeroutput> left alignment. </para></listitem><listitem><para><computeroutput>AlignCenter</computeroutput> center alignment. </para></listitem><listitem><para><computeroutput>AlignRight</computeroutput> right alignment</para></listitem></itemizedlist>
No other types of alignment are supported.</para>
Expand Down
2 changes: 2 additions & 0 deletions testing/005/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>
<simplesect kind="attention">
Expand Down
2 changes: 2 additions & 0 deletions testing/006/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>
<simplesect kind="author">
Expand Down
2 changes: 2 additions & 0 deletions testing/007/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>Text <bold>bold</bold> normal text. </para>
</detaileddescription>
Expand Down
2 changes: 2 additions & 0 deletions testing/009/bug.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="bug" kind="page">
<compoundname>bug</compoundname>
<title>Bug List</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>
<variablelist>
Expand Down
2 changes: 2 additions & 0 deletions testing/009/deprecated.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="deprecated" kind="page">
<compoundname>deprecated</compoundname>
<title>Deprecated List</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>
<variablelist>
Expand Down
2 changes: 2 additions & 0 deletions testing/009/reminders.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="reminders" kind="page">
<compoundname>reminders</compoundname>
<title>Reminders</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>
<variablelist>
Expand Down
2 changes: 2 additions & 0 deletions testing/009/test.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="test" kind="page">
<compoundname>test</compoundname>
<title>Test List</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>
<variablelist>
Expand Down
2 changes: 2 additions & 0 deletions testing/009/todo.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="todo" kind="page">
<compoundname>todo</compoundname>
<title>Todo List</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>
<variablelist>
Expand Down
2 changes: 2 additions & 0 deletions testing/010/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>Text <computeroutput>code</computeroutput> normal text.</para>
<para>Text <computeroutput>code</computeroutput> normal text. </para>
Expand Down
2 changes: 2 additions & 0 deletions testing/012/citelist.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="citelist" kind="page">
<compoundname>citelist</compoundname>
<title>Bibliography</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>
<variablelist>
Expand Down
2 changes: 2 additions & 0 deletions testing/012/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>See <ref refid="citelist_1CITEREF_knuth79" kindref="member">[1]</ref> for more info. </para>
</detaileddescription>
Expand Down
2 changes: 2 additions & 0 deletions testing/014/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>
<programlisting filename=".py">
Expand Down
2 changes: 2 additions & 0 deletions testing/017/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>
<simplesect kind="copyright">
Expand Down
2 changes: 2 additions & 0 deletions testing/020/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>Text.
XML
Expand Down
2 changes: 2 additions & 0 deletions testing/021/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para> Our main function starts like this: <programlisting filename="example_test.cpp"><codeline><highlight class="normal">void<sp/>main()</highlight></codeline><codeline><highlight class="normal">{</highlight></codeline></programlisting> First we create a object <computeroutput>t</computeroutput> of the <ref refid="class_test" kindref="compound">Test</ref> class. <programlisting filename="example_test.cpp"><codeline><highlight class="normal"><sp/><sp/>Test<sp/>t;</highlight></codeline></programlisting> Then we call the example member function <programlisting filename="example_test.cpp"><codeline><highlight class="normal"><sp/><sp/>t.example();</highlight></codeline></programlisting> After that our little test routine ends. <programlisting filename="example_test.cpp"><codeline><highlight class="normal">}</highlight></codeline></programlisting> </para>
</detaileddescription>
Expand Down
2 changes: 2 additions & 0 deletions testing/022/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>Class relations expressed via an inline dot graph: <dot>
digraph example {
Expand Down
2 changes: 2 additions & 0 deletions testing/023/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>Normal <emphasis>emphasis</emphasis> and more <emphasis>emphasis</emphasis> back to normal. </para>
</detaileddescription>
Expand Down
2 changes: 2 additions & 0 deletions testing/024/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>Unconditional (start) Enabled (if). Enabled (else). Unconditional (middle) Enabled (else). Unconditional (end) </para>
</detaileddescription>
Expand Down
2 changes: 2 additions & 0 deletions testing/025/example_test_8cpp-example.xml
Expand Up @@ -2,6 +2,8 @@
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="">
<compounddef id="example_test_8cpp-example" kind="example">
<compoundname>example_test.cpp</compoundname>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>This is an example of how to use the <ref refid="class_test" kindref="compound">Test</ref> class.</para>
<para>More details about this example. <programlisting filename="example_test.cpp"><codeline><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>main()</highlight></codeline><codeline><highlight class="normal">{</highlight></codeline><codeline><highlight class="normal"><sp/><sp/><ref refid="class_test" kindref="compound">Test</ref><sp/>t;</highlight></codeline><codeline><highlight class="normal"><sp/><sp/>t.<ref refid="class_test_1a47b775f65718978f1ffcd96376f8ecfa" kindref="member">example</ref>();</highlight></codeline><codeline><highlight class="normal">}</highlight></codeline><codeline><highlight class="normal"/></codeline></programlisting> </para>
Expand Down
2 changes: 2 additions & 0 deletions testing/028/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>Here are some formulas:<orderedlist><listitem><para>The distance between <formula id="0">$(x_1,y_1)$</formula> and <formula id="1">$(x_2,y_2)$</formula> is <formula id="2">$\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}$</formula>.</para></listitem><listitem><para>Unnumbered formula: <formula id="3">\[ |I_2|=\left| \int_{0}^T \psi(t) \left\{ u(a,t)- \int_{\gamma(t)}^a \frac{d\theta}{k(\theta,t)} \int_{a}^\theta c(\xi)u_t(\xi,t)\,d\xi \right\} dt \right| \]</formula></para></listitem><listitem><para>Formula in different environment <formula id="4">\begin{eqnarray*} g &amp;=&amp; \frac{Gm_2}{r^2} \\ &amp;=&amp; \frac{(6.673 \times 10^{-11}\,\mbox{m}^3\,\mbox{kg}^{-1}\, \mbox{s}^{-2})(5.9736 \times 10^{24}\,\mbox{kg})}{(6371.01\,\mbox{km})^2} \\ &amp;=&amp; 9.82066032\,\mbox{m/s}^2 \end{eqnarray*}</formula> </para></listitem></orderedlist>
</para>
Expand Down
2 changes: 2 additions & 0 deletions testing/030/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>Some text. <htmlonly>&lt;h1&gt;Hello world&lt;/h1&gt;
</htmlonly> More text. </para>
Expand Down
2 changes: 2 additions & 0 deletions testing/031/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>Some text. <image type="html" name="sample.png"/>
<image type="latex" name="sample.png" width="5cm">Doxygen logo</image>
Expand Down
2 changes: 2 additions & 0 deletions testing/032/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>Some text. <programlisting filename="example_test.cpp"><codeline><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>main()</highlight></codeline><codeline><highlight class="normal">{</highlight></codeline><codeline><highlight class="normal"><sp/><sp/>Test<sp/>t;</highlight></codeline><codeline><highlight class="normal"><sp/><sp/>t.example();</highlight></codeline><codeline><highlight class="normal">}</highlight></codeline><codeline><highlight class="normal"/></codeline></programlisting> More text. <programlisting filename="example_test.cpp"><codeline lineno="1"><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>main()</highlight></codeline><codeline lineno="2"><highlight class="normal">{</highlight></codeline><codeline lineno="3"><highlight class="normal"><sp/><sp/>Test<sp/>t;</highlight></codeline><codeline lineno="4"><highlight class="normal"><sp/><sp/>t.example();</highlight></codeline><codeline lineno="5"><highlight class="normal">}</highlight></codeline><codeline lineno="6"><highlight class="normal"/></codeline></programlisting> End. </para>
</detaileddescription>
Expand Down
2 changes: 2 additions & 0 deletions testing/033/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>Some text.</para>
<para>More visible text. </para>
Expand Down
2 changes: 2 additions & 0 deletions testing/034/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>Some text. </para>
<internal>
Expand Down
2 changes: 2 additions & 0 deletions testing/038/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>Text<linebreak/>
New line<linebreak/>
Expand Down
2 changes: 2 additions & 0 deletions testing/043/another.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="another" kind="page">
<compoundname>another</compoundname>
<title>Another Page</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>Another page's text. </para>
</detaileddescription>
Expand Down
4 changes: 4 additions & 0 deletions testing/043/mypage.xml
Expand Up @@ -4,7 +4,11 @@
<compoundname>mypage</compoundname>
<title>Page Title</title>
<innerpage refid="another">Another Page</innerpage>
<briefdescription>
<para>Page brief description. </para>
</briefdescription>
<detaileddescription>
<para>Page brief description.</para>
<para>Text at page level. See <ref refid="mypage_1mysect" kindref="member">Section Title.</ref> for more. </para>
<sect1 id="mypage_1mysect">
<title>Section Title.</title>
Expand Down
2 changes: 2 additions & 0 deletions testing/043_page.dox
Expand Up @@ -2,6 +2,8 @@
// check: mypage.xml
// check: another.xml
/** \page mypage Page Title
* \brief Page brief description.
*
* Text at page level. See \ref mysect for more.
* \section mysect Section Title.
* Text at section level. See \ref mysubsect for more.
Expand Down
2 changes: 2 additions & 0 deletions testing/045/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>
<toclist>
Expand Down
2 changes: 2 additions & 0 deletions testing/049/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>A bubble sort algorithm First get the inputs <programlisting filename="snippet_test.cpp"><codeline><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(i=0<sp/>;<sp/>i&lt;n<sp/>;<sp/>i++)</highlight></codeline><codeline><highlight class="normal"><sp/><sp/>{</highlight></codeline><codeline><highlight class="normal"><sp/><sp/><sp/><sp/>printf(</highlight><highlight class="stringliteral">"<sp/>Array[%d]<sp/>=<sp/>"</highlight><highlight class="normal">,i);</highlight></codeline><codeline><highlight class="normal"><sp/><sp/><sp/><sp/>scanf(</highlight><highlight class="stringliteral">"%d"</highlight><highlight class="normal">,&amp;arr[i]);</highlight></codeline><codeline><highlight class="normal"><sp/><sp/>}</highlight></codeline></programlisting>Then do the bubbling <programlisting filename="snippet_test.cpp"><codeline><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(i=0<sp/>;<sp/>i&lt;n<sp/>;<sp/>i++)</highlight></codeline><codeline><highlight class="normal"><sp/><sp/>{</highlight></codeline><codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(j=0<sp/>;<sp/>j&lt;n-i-1<sp/>;<sp/>j++)</highlight></codeline><codeline><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline><codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(arr[j]&gt;arr[j+1])<sp/></highlight><highlight class="comment">//Swapping<sp/>Condition<sp/>is<sp/>Checked</highlight><highlight class="normal"/></codeline><codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline><codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>temp=arr[j];</highlight></codeline><codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>arr[j]=arr[j+1];</highlight></codeline><codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>arr[j+1]=temp;</highlight></codeline><codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline><codeline><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline><codeline><highlight class="normal"><sp/><sp/>}</highlight></codeline></programlisting>Then write the result <programlisting filename="snippet_test.cpp"><codeline><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(i=0<sp/>;<sp/>i&lt;n<sp/>;<sp/>i++)</highlight></codeline><codeline><highlight class="normal"><sp/><sp/>{</highlight></codeline><codeline><highlight class="normal"><sp/><sp/><sp/><sp/>printf(</highlight><highlight class="stringliteral">"<sp/>%4d"</highlight><highlight class="normal">,arr[i]);</highlight></codeline><codeline><highlight class="normal"><sp/><sp/>}</highlight></codeline></programlisting></para>
</detaileddescription>
Expand Down
2 changes: 2 additions & 0 deletions testing/050/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>Some normal text. <verbatim>A verbatim section with a /* C comment */ in it
</verbatim> Showing a file as verbatim <verbatim>@book{knuth79,
Expand Down
2 changes: 2 additions & 0 deletions testing/051/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>Dollar $ At @ Backslash \ Amphasand &amp; Less &lt; Greater &gt; Hash # Percent % Quote " Dot . Double colon :: Pipe | Plus + Minus - </para>
</detaileddescription>
Expand Down
2 changes: 2 additions & 0 deletions testing/052/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>This is English. Output for all languages. </para>
</detaileddescription>
Expand Down
2 changes: 2 additions & 0 deletions testing/053/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>Dit is Nederlands. Output for all languages. </para>
</detaileddescription>
Expand Down
2 changes: 2 additions & 0 deletions testing/055/md_055_markdown.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="md_055_markdown" kind="page">
<compoundname>md_055_markdown</compoundname>
<title>055_markdown</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>
<heading level="1">Foo</heading>
Expand Down
2 changes: 2 additions & 0 deletions testing/056/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>Some text. <latexonly>\section{Hello world}
</latexonly> More text. </para>
Expand Down
2 changes: 2 additions & 0 deletions testing/065/indexpage.xml
Expand Up @@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>これは日本語(en)です. Output for all languages. </para>
</detaileddescription>
Expand Down

0 comments on commit bd2cf98

Please sign in to comment.