Permalink
Browse files

Provide page brief in <briefdescription> of XML output.

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 bd2cf98e75c600e0c2f5ae95301df8745d65571a
Showing with 89 additions and 0 deletions.
  1. +3 −0 src/xmlgen.cpp
  2. +2 −0 testing/001/indexpage.xml
  3. +2 −0 testing/002/indexpage.xml
  4. +2 −0 testing/003/indexpage.xml
  5. +2 −0 testing/004/indexpage.xml
  6. +2 −0 testing/005/indexpage.xml
  7. +2 −0 testing/006/indexpage.xml
  8. +2 −0 testing/007/indexpage.xml
  9. +2 −0 testing/009/bug.xml
  10. +2 −0 testing/009/deprecated.xml
  11. +2 −0 testing/009/reminders.xml
  12. +2 −0 testing/009/test.xml
  13. +2 −0 testing/009/todo.xml
  14. +2 −0 testing/010/indexpage.xml
  15. +2 −0 testing/012/citelist.xml
  16. +2 −0 testing/012/indexpage.xml
  17. +2 −0 testing/014/indexpage.xml
  18. +2 −0 testing/017/indexpage.xml
  19. +2 −0 testing/020/indexpage.xml
  20. +2 −0 testing/021/indexpage.xml
  21. +2 −0 testing/022/indexpage.xml
  22. +2 −0 testing/023/indexpage.xml
  23. +2 −0 testing/024/indexpage.xml
  24. +2 −0 testing/025/example_test_8cpp-example.xml
  25. +2 −0 testing/028/indexpage.xml
  26. +2 −0 testing/030/indexpage.xml
  27. +2 −0 testing/031/indexpage.xml
  28. +2 −0 testing/032/indexpage.xml
  29. +2 −0 testing/033/indexpage.xml
  30. +2 −0 testing/034/indexpage.xml
  31. +2 −0 testing/038/indexpage.xml
  32. +2 −0 testing/043/another.xml
  33. +4 −0 testing/043/mypage.xml
  34. +2 −0 testing/043_page.dox
  35. +2 −0 testing/045/indexpage.xml
  36. +2 −0 testing/049/indexpage.xml
  37. +2 −0 testing/050/indexpage.xml
  38. +2 −0 testing/051/indexpage.xml
  39. +2 −0 testing/052/indexpage.xml
  40. +2 −0 testing/053/indexpage.xml
  41. +2 −0 testing/055/md_055_markdown.xml
  42. +2 −0 testing/056/indexpage.xml
  43. +2 −0 testing/065/indexpage.xml
@@ -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)
{
@@ -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>
@@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>
<indexentry>
@@ -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>
@@ -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>
@@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>
<simplesect kind="attention">
@@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>
<simplesect kind="author">
@@ -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>
@@ -3,6 +3,8 @@
<compounddef id="bug" kind="page">
<compoundname>bug</compoundname>
<title>Bug List</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>
<variablelist>
@@ -3,6 +3,8 @@
<compounddef id="deprecated" kind="page">
<compoundname>deprecated</compoundname>
<title>Deprecated List</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>
<variablelist>
@@ -3,6 +3,8 @@
<compounddef id="reminders" kind="page">
<compoundname>reminders</compoundname>
<title>Reminders</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>
<variablelist>
@@ -3,6 +3,8 @@
<compounddef id="test" kind="page">
<compoundname>test</compoundname>
<title>Test List</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>
<variablelist>
@@ -3,6 +3,8 @@
<compounddef id="todo" kind="page">
<compoundname>todo</compoundname>
<title>Todo List</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>
<variablelist>
@@ -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>
@@ -3,6 +3,8 @@
<compounddef id="citelist" kind="page">
<compoundname>citelist</compoundname>
<title>Bibliography</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>
<variablelist>
@@ -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>
@@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>
<programlisting filename=".py">
@@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>
<simplesect kind="copyright">
@@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>Text.
XML
@@ -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>
@@ -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 {
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>Some text. </para>
<internal>
@@ -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/>
@@ -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>
@@ -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>
@@ -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.
@@ -3,6 +3,8 @@
<compounddef id="indexpage" kind="page">
<compoundname>index</compoundname>
<title>My Project</title>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>
<toclist>
@@ -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>
@@ -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,
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>

0 comments on commit bd2cf98

Please sign in to comment.