From 352ab16413d51c655741cff927911f6126471198 Mon Sep 17 00:00:00 2001 From: Jan Theegarten Date: Wed, 25 Mar 2020 09:48:10 +0100 Subject: Add location to xml representation of pages. --- src/xmlgen.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index bf5af84..794e5a2 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -1774,6 +1774,7 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample) // + name // + title // + documentation + // + location const char *kindName = isExample ? "example" : "page"; @@ -1904,6 +1905,8 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample) } t << " " << endl; + t << " getDefFileName())) << "\"/>" << endl; + t << " " << endl; t << "" << endl; -- cgit v0.12 From c37fe44163a254835aef8cf05e59979b18552ab0 Mon Sep 17 00:00:00 2001 From: Jan Theegarten Date: Thu, 18 Jun 2020 15:39:54 +0200 Subject: Implement alt="" for images in xml. --- src/xmldocvisitor.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp index 73aac7c..77f3e8e 100644 --- a/src/xmldocvisitor.cpp +++ b/src/xmldocvisitor.cpp @@ -41,7 +41,7 @@ static void visitCaption(XmlDocVisitor *parent, QList children) static void visitPreStart(FTextStream &t, const char *cmd, bool doCaption, XmlDocVisitor *parent, QList children, const QCString &name, bool writeType, DocImage::Type type, const QCString &width, - const QCString &height, bool inlineImage = FALSE) + const QCString &height, const QCString &alt = QCString(""), bool inlineImage = FALSE) { t << "<" << cmd; if (writeType) @@ -68,6 +68,10 @@ static void visitPreStart(FTextStream &t, const char *cmd, bool doCaption, { t << " height=\"" << convertToXML(height) << "\""; } + if (!alt.isEmpty()) + { + t << " alt=\"" << convertToXML(alt) << "\""; + } if (inlineImage) { t << " inline=\"yes\""; @@ -907,7 +911,7 @@ void XmlDocVisitor::visitPre(DocImage *img) { baseName = correctURL(url,img->relPath()); } - visitPreStart(m_t, "image", FALSE, this, img->children(), baseName, TRUE, img->type(), img->width(), img->height(), img ->isInlineImage()); + visitPreStart(m_t, "image", FALSE, this, img->children(), baseName, TRUE, img->type(), img->width(), img->height(), img->attribs().find("alt"), img->isInlineImage()); // copy the image to the output dir FileDef *fd; -- cgit v0.12 From db1d1fa78e53248ea96a26700b52c393f54c521f Mon Sep 17 00:00:00 2001 From: Jan Theegarten Date: Thu, 7 Jan 2021 14:45:07 +0100 Subject: Add width attribute of tables and table cells to xml output. --- src/xmldocvisitor.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp index 77f3e8e..30a5f01 100644 --- a/src/xmldocvisitor.cpp +++ b/src/xmldocvisitor.cpp @@ -778,7 +778,17 @@ void XmlDocVisitor::visitPre(DocHtmlTable *t) { if (m_hide) return; m_t << "numRows() - << "\" cols=\"" << t->numColumns() << "\">" ; + << "\" cols=\"" << t->numColumns() << "\"" ; + HtmlAttribListIterator li(t->attribs()); + HtmlAttrib* opt; + for (li.toFirst(); (opt = li.current()); ++li) + { + if (opt->name == "width") + { + m_t << " " << opt->name << "=\"" << opt->value << "\""; + } + } + m_t << ">"; } void XmlDocVisitor::visitPost(DocHtmlTable *) @@ -816,7 +826,11 @@ void XmlDocVisitor::visitPre(DocHtmlCell *c) { m_t << " align=\"" << opt->value << "\""; } - else if (opt->name=="class") // handle markdown generated attributes + else if (opt->name == "width") + { + m_t << " width=\"" << opt->value << "\""; + } + else if (opt->name == "class") // handle markdown generated attributes { if (opt->value.left(13)=="markdownTable") // handle markdown generated attributes { -- cgit v0.12 From 8e2d091818580e25a133257909c19cddc2f80054 Mon Sep 17 00:00:00 2001 From: Jan Theegarten Date: Thu, 7 Jan 2021 14:46:26 +0100 Subject: Adapt formatting --- src/xmldocvisitor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp index 30a5f01..3ecd15b 100644 --- a/src/xmldocvisitor.cpp +++ b/src/xmldocvisitor.cpp @@ -783,7 +783,7 @@ void XmlDocVisitor::visitPre(DocHtmlTable *t) HtmlAttrib* opt; for (li.toFirst(); (opt = li.current()); ++li) { - if (opt->name == "width") + if (opt->name=="width") { m_t << " " << opt->name << "=\"" << opt->value << "\""; } @@ -826,11 +826,11 @@ void XmlDocVisitor::visitPre(DocHtmlCell *c) { m_t << " align=\"" << opt->value << "\""; } - else if (opt->name == "width") + else if (opt->name=="width") { m_t << " width=\"" << opt->value << "\""; } - else if (opt->name == "class") // handle markdown generated attributes + else if (opt->name=="class") // handle markdown generated attributes { if (opt->value.left(13)=="markdownTable") // handle markdown generated attributes { -- cgit v0.12 From 04c8d255bdf00e3e470896965ed37d1f15f8f81b Mon Sep 17 00:00:00 2001 From: Jan Theegarten Date: Thu, 7 Jan 2021 14:48:59 +0100 Subject: Add valign attribute of table cells to xml output. --- src/xmldocvisitor.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp index 3ecd15b..29990c9 100644 --- a/src/xmldocvisitor.cpp +++ b/src/xmldocvisitor.cpp @@ -826,6 +826,11 @@ void XmlDocVisitor::visitPre(DocHtmlCell *c) { m_t << " align=\"" << opt->value << "\""; } + else if (opt->name=="valign" && + (opt->value == "bottom" || opt->value == "top" || opt->value == "middle")) + { + m_t << " valign=\"" << opt->value << "\""; + } else if (opt->name=="width") { m_t << " width=\"" << opt->value << "\""; -- cgit v0.12 From 0db750805f7028a32a30330a1558405dd3eea92e Mon Sep 17 00:00:00 2001 From: Jan Theegarten Date: Thu, 7 Jan 2021 19:23:20 +0100 Subject: Update test references --- testing/001/indexpage.xml | 1 + testing/002/indexpage.xml | 1 + testing/003/indexpage.xml | 1 + testing/004/indexpage.xml | 1 + testing/005/indexpage.xml | 1 + testing/006/indexpage.xml | 1 + testing/007/indexpage.xml | 1 + testing/009/bug.xml | 1 + testing/009/deprecated.xml | 1 + testing/009/reminders.xml | 1 + testing/009/test.xml | 1 + testing/009/todo.xml | 1 + testing/010/indexpage.xml | 1 + testing/012/citelist.xml | 1 + testing/012/indexpage.xml | 1 + testing/014/indexpage.xml | 1 + testing/017/indexpage.xml | 1 + testing/020/indexpage.xml | 1 + testing/021/indexpage.xml | 1 + testing/022/indexpage.xml | 1 + testing/023/indexpage.xml | 1 + testing/024/indexpage.xml | 1 + testing/025/example_test_8cpp-example.xml | 1 + testing/028/indexpage.xml | 1 + testing/030/indexpage.xml | 1 + testing/031/indexpage.xml | 17 +++++++++-------- testing/032/indexpage.xml | 1 + testing/033/indexpage.xml | 1 + testing/034/indexpage.xml | 1 + testing/038/indexpage.xml | 1 + testing/043/another.xml | 1 + testing/043/mypage.xml | 1 + testing/045/indexpage.xml | 1 + testing/049/indexpage.xml | 1 + testing/050/indexpage.xml | 1 + testing/051/indexpage.xml | 1 + testing/052/indexpage.xml | 1 + testing/053/indexpage.xml | 1 + testing/055/md_055_markdown.xml | 1 + testing/056/indexpage.xml | 1 + testing/065/indexpage.xml | 1 + testing/076/indexpage.xml | 1 + testing/079/empty.xml | 1 + testing/079/levels.xml | 1 + 44 files changed, 52 insertions(+), 8 deletions(-) diff --git a/testing/001/indexpage.xml b/testing/001/indexpage.xml index df18edd..7c4a448 100644 --- a/testing/001/indexpage.xml +++ b/testing/001/indexpage.xml @@ -8,5 +8,6 @@ Text argument more text. + diff --git a/testing/002/indexpage.xml b/testing/002/indexpage.xml index c74349b..bde0d33 100644 --- a/testing/002/indexpage.xml +++ b/testing/002/indexpage.xml @@ -13,5 +13,6 @@ + diff --git a/testing/003/indexpage.xml b/testing/003/indexpage.xml index b1caea6..23c1867 100644 --- a/testing/003/indexpage.xml +++ b/testing/003/indexpage.xml @@ -8,5 +8,6 @@ See Anchor Some text. More text. + diff --git a/testing/004/indexpage.xml b/testing/004/indexpage.xml index 9ab6ae4..5585cf7 100644 --- a/testing/004/indexpage.xml +++ b/testing/004/indexpage.xml @@ -11,5 +11,6 @@ No other types of alignment are supported. AlignLeft left alignment. AlignCenter center alignment. AlignRight right alignment No other types of alignment are supported. + diff --git a/testing/005/indexpage.xml b/testing/005/indexpage.xml index 5a3d36a..8268925 100644 --- a/testing/005/indexpage.xml +++ b/testing/005/indexpage.xml @@ -33,5 +33,6 @@ + diff --git a/testing/006/indexpage.xml b/testing/006/indexpage.xml index b3c66ef..fe2086d 100644 --- a/testing/006/indexpage.xml +++ b/testing/006/indexpage.xml @@ -24,5 +24,6 @@ + diff --git a/testing/007/indexpage.xml b/testing/007/indexpage.xml index 62f3636..c332c4d 100644 --- a/testing/007/indexpage.xml +++ b/testing/007/indexpage.xml @@ -8,5 +8,6 @@ Text bold normal text. + diff --git a/testing/009/bug.xml b/testing/009/bug.xml index ebafb9a..e7aff1d 100644 --- a/testing/009/bug.xml +++ b/testing/009/bug.xml @@ -23,5 +23,6 @@ + diff --git a/testing/009/deprecated.xml b/testing/009/deprecated.xml index e25331d..32438e4 100644 --- a/testing/009/deprecated.xml +++ b/testing/009/deprecated.xml @@ -23,5 +23,6 @@ + diff --git a/testing/009/reminders.xml b/testing/009/reminders.xml index ccdedf1..fe05e27 100644 --- a/testing/009/reminders.xml +++ b/testing/009/reminders.xml @@ -23,5 +23,6 @@ + diff --git a/testing/009/test.xml b/testing/009/test.xml index 04d615c..c3a8b83 100644 --- a/testing/009/test.xml +++ b/testing/009/test.xml @@ -23,5 +23,6 @@ + diff --git a/testing/009/todo.xml b/testing/009/todo.xml index 7cdaea6..892c616 100644 --- a/testing/009/todo.xml +++ b/testing/009/todo.xml @@ -23,5 +23,6 @@ + diff --git a/testing/010/indexpage.xml b/testing/010/indexpage.xml index 6deac96..35dd4f0 100644 --- a/testing/010/indexpage.xml +++ b/testing/010/indexpage.xml @@ -9,5 +9,6 @@ Text code normal text. Text code normal text. + diff --git a/testing/012/citelist.xml b/testing/012/citelist.xml index f5addb1..c409ae1 100644 --- a/testing/012/citelist.xml +++ b/testing/012/citelist.xml @@ -39,5 +39,6 @@ + diff --git a/testing/012/indexpage.xml b/testing/012/indexpage.xml index 26e588c..493d138 100644 --- a/testing/012/indexpage.xml +++ b/testing/012/indexpage.xml @@ -9,5 +9,6 @@ See [3] for more info. Other references with cross references see [1] and [2] for more info. + diff --git a/testing/014/indexpage.xml b/testing/014/indexpage.xml index 0d60a80..3f9510c 100644 --- a/testing/014/indexpage.xml +++ b/testing/014/indexpage.xml @@ -47,5 +47,6 @@ + diff --git a/testing/017/indexpage.xml b/testing/017/indexpage.xml index c6739e9..884091e 100644 --- a/testing/017/indexpage.xml +++ b/testing/017/indexpage.xml @@ -15,5 +15,6 @@ + diff --git a/testing/020/indexpage.xml b/testing/020/indexpage.xml index 863a088..f31986b 100644 --- a/testing/020/indexpage.xml +++ b/testing/020/indexpage.xml @@ -22,5 +22,6 @@ XML DocBook More text. + diff --git a/testing/021/indexpage.xml b/testing/021/indexpage.xml index 477f206..473482a 100644 --- a/testing/021/indexpage.xml +++ b/testing/021/indexpage.xml @@ -8,5 +8,6 @@ Our main function starts like this: voidmain(){ First we create a object t of the Test class. Testt; Then we call the example member function t.example(); After that our little test routine ends. } + diff --git a/testing/022/indexpage.xml b/testing/022/indexpage.xml index 581130a..3d80cb2 100644 --- a/testing/022/indexpage.xml +++ b/testing/022/indexpage.xml @@ -16,5 +16,6 @@ digraph example { + diff --git a/testing/023/indexpage.xml b/testing/023/indexpage.xml index 3f605db..a0c4e55 100644 --- a/testing/023/indexpage.xml +++ b/testing/023/indexpage.xml @@ -8,5 +8,6 @@ Normal emphasis and more emphasis back to normal. + diff --git a/testing/024/indexpage.xml b/testing/024/indexpage.xml index bd94eb8..026ae8c 100644 --- a/testing/024/indexpage.xml +++ b/testing/024/indexpage.xml @@ -22,5 +22,6 @@ test1test3. + diff --git a/testing/025/example_test_8cpp-example.xml b/testing/025/example_test_8cpp-example.xml index 55bcfd6..880d7f1 100644 --- a/testing/025/example_test_8cpp-example.xml +++ b/testing/025/example_test_8cpp-example.xml @@ -8,5 +8,6 @@ This is an example of how to use the Test class. More details about this example. voidmain(){constchar*a="Somespecialcharacterhere:";Testt;t.example();} + diff --git a/testing/028/indexpage.xml b/testing/028/indexpage.xml index 11d3932..93485c4 100644 --- a/testing/028/indexpage.xml +++ b/testing/028/indexpage.xml @@ -9,5 +9,6 @@ Here are some formulas:The distance between $(x_1,y_1)$ and $(x_2,y_2)$ is $\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}$.Unnumbered formula: \[ |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 in different environment \begin{eqnarray*} g &=& \frac{Gm_2}{r^2} \\ &=& \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} \\ &=& 9.82066032\,\mbox{m/s}^2 \end{eqnarray*} + diff --git a/testing/030/indexpage.xml b/testing/030/indexpage.xml index 646a128..8bbf660 100644 --- a/testing/030/indexpage.xml +++ b/testing/030/indexpage.xml @@ -9,5 +9,6 @@ Some text. <h1>Hello world</h1> More text. + diff --git a/testing/031/indexpage.xml b/testing/031/indexpage.xml index fc030f6..0690560 100644 --- a/testing/031/indexpage.xml +++ b/testing/031/indexpage.xml @@ -29,26 +29,27 @@ This image is inline MIT license within the text. Markdown style linked SVG image: - + Markdown style linked PNG image: - + HTML style linked SVG image: - + HTML style linked PNG image: - + HTML style unlinked SVG image: - + HTML style unlinked PNG image: - + Some markdown image tests - + Some normal link - + Some normal link + diff --git a/testing/032/indexpage.xml b/testing/032/indexpage.xml index 742c401..f33c8b2 100644 --- a/testing/032/indexpage.xml +++ b/testing/032/indexpage.xml @@ -8,5 +8,6 @@ Some text. voidmain(){constchar*a="Somespecialcharacterhere:";Testt;t.example();} More text. voidmain(){constchar*a="Somespecialcharacterhere:";Testt;t.example();} End. + diff --git a/testing/033/indexpage.xml b/testing/033/indexpage.xml index 8894e6c..e00c009 100644 --- a/testing/033/indexpage.xml +++ b/testing/033/indexpage.xml @@ -9,5 +9,6 @@ Some text. More visible text. + diff --git a/testing/034/indexpage.xml b/testing/034/indexpage.xml index 409298d..404fa20 100644 --- a/testing/034/indexpage.xml +++ b/testing/034/indexpage.xml @@ -27,5 +27,6 @@ Visible text. + diff --git a/testing/038/indexpage.xml b/testing/038/indexpage.xml index 3309dda..01a8c5d 100644 --- a/testing/038/indexpage.xml +++ b/testing/038/indexpage.xml @@ -10,5 +10,6 @@ New line Another line + diff --git a/testing/043/another.xml b/testing/043/another.xml index 66688bd..8a74545 100644 --- a/testing/043/another.xml +++ b/testing/043/another.xml @@ -8,5 +8,6 @@ Another page's text. + diff --git a/testing/043/mypage.xml b/testing/043/mypage.xml index c02b4c4..d1a65bd 100644 --- a/testing/043/mypage.xml +++ b/testing/043/mypage.xml @@ -62,5 +62,6 @@ + diff --git a/testing/045/indexpage.xml b/testing/045/indexpage.xml index aaa8934..2a1b8c7 100644 --- a/testing/045/indexpage.xml +++ b/testing/045/indexpage.xml @@ -19,5 +19,6 @@ Section 1 text. + diff --git a/testing/049/indexpage.xml b/testing/049/indexpage.xml index c5ae30f..2b78363 100644 --- a/testing/049/indexpage.xml +++ b/testing/049/indexpage.xml @@ -8,5 +8,6 @@ A bubble sort algorithm First get the inputs for(i=0;i<n;i++){printf("Array[%d]=",i);scanf("%d",&arr[i]);}Then do the bubbling for(i=0;i<n;i++){for(j=0;j<n-i-1;j++){if(arr[j]>arr[j+1])//SwappingConditionisChecked{temp=arr[j];arr[j]=arr[j+1];arr[j+1]=temp;}}}Then write the result for(i=0;i<n;i++){printf("%4d",arr[i]);} + diff --git a/testing/050/indexpage.xml b/testing/050/indexpage.xml index 1987274..f2414ce 100644 --- a/testing/050/indexpage.xml +++ b/testing/050/indexpage.xml @@ -41,5 +41,6 @@ } More text after the verbatim section. + diff --git a/testing/051/indexpage.xml b/testing/051/indexpage.xml index 63f2d91..2fcf5ac 100644 --- a/testing/051/indexpage.xml +++ b/testing/051/indexpage.xml @@ -8,5 +8,6 @@ Dollar $ At @ Backslash \ Ampersand & Less < Greater > Hash # Percent % Quote " Dot . Double colon :: Pipe | Plus + Minus - + diff --git a/testing/052/indexpage.xml b/testing/052/indexpage.xml index 0306320..5f5d78f 100644 --- a/testing/052/indexpage.xml +++ b/testing/052/indexpage.xml @@ -8,5 +8,6 @@ This is English. Output for all languages. + diff --git a/testing/053/indexpage.xml b/testing/053/indexpage.xml index 9f33bcf..8698375 100644 --- a/testing/053/indexpage.xml +++ b/testing/053/indexpage.xml @@ -8,5 +8,6 @@ Dit is Nederlands. Output for all languages. + diff --git a/testing/055/md_055_markdown.xml b/testing/055/md_055_markdown.xml index 423a28c..8423c35 100644 --- a/testing/055/md_055_markdown.xml +++ b/testing/055/md_055_markdown.xml @@ -33,5 +33,6 @@ + diff --git a/testing/056/indexpage.xml b/testing/056/indexpage.xml index ac89900..2cfff91 100644 --- a/testing/056/indexpage.xml +++ b/testing/056/indexpage.xml @@ -9,5 +9,6 @@ Some text. \section{Hello world} More text. + diff --git a/testing/065/indexpage.xml b/testing/065/indexpage.xml index e86dcff..c8eb957 100644 --- a/testing/065/indexpage.xml +++ b/testing/065/indexpage.xml @@ -8,5 +8,6 @@ これは日本語(en)です. Output for all languages. + diff --git a/testing/076/indexpage.xml b/testing/076/indexpage.xml index f2ec00e..3b6fd6c 100644 --- a/testing/076/indexpage.xml +++ b/testing/076/indexpage.xml @@ -1496,5 +1496,6 @@ from "zzz" + diff --git a/testing/079/empty.xml b/testing/079/empty.xml index 3c753c1..3af5afb 100644 --- a/testing/079/empty.xml +++ b/testing/079/empty.xml @@ -8,5 +8,6 @@ With an empty TOC. + diff --git a/testing/079/levels.xml b/testing/079/levels.xml index 8a208b4..76089bd 100644 --- a/testing/079/levels.xml +++ b/testing/079/levels.xml @@ -37,5 +37,6 @@ Yay! + -- cgit v0.12 From 8e0f3b40fc36f38cf3b5d78d859b1e8678de0069 Mon Sep 17 00:00:00 2001 From: Jan Theegarten Date: Thu, 7 Jan 2021 22:20:45 +0100 Subject: Changed XML scheme accordingly. --- templates/xml/compound.xsd | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/templates/xml/compound.xsd b/templates/xml/compound.xsd index 974a43c..400bea5 100644 --- a/templates/xml/compound.xsd +++ b/templates/xml/compound.xsd @@ -560,6 +560,7 @@ + @@ -576,6 +577,8 @@ + + @@ -595,6 +598,7 @@ + @@ -951,5 +955,13 @@ + + + + + + + + -- cgit v0.12