summaryrefslogtreecommitdiffstats
path: root/src/xmlgen.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2014-02-09 14:34:55 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2014-02-09 14:34:55 (GMT)
commit69665ef2ad0779f9255242929fb6028c8c3ec518 (patch)
treea1cc7e37e28f54705db077997d42f5ebef70bfa4 /src/xmlgen.cpp
parentc625dc7802e269587b678b5ca84b341401536133 (diff)
parent1bd64ac0e925ba2ff069ec64c026ea3c32f85600 (diff)
downloadDoxygen-69665ef2ad0779f9255242929fb6028c8c3ec518.zip
Doxygen-69665ef2ad0779f9255242929fb6028c8c3ec518.tar.gz
Doxygen-69665ef2ad0779f9255242929fb6028c8c3ec518.tar.bz2
Merge branch 'feature/html_entities' of https://github.com/albert-github/doxygen into albert-github-feature/html_entities
Diffstat (limited to 'src/xmlgen.cpp')
-rw-r--r--src/xmlgen.cpp43
1 files changed, 42 insertions, 1 deletions
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 570901f..084c2d7 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -1897,7 +1897,48 @@ void generateXML()
err("Cannot open file %s for writing!\n",fileName.data());
return;
}
- f.writeBlock(compound_xsd,qstrlen(compound_xsd));
+ /*
+ * If the compound_xsd contyains the special string
+ * write part till special string
+ * for each html entity
+ * write xsd entry with xml element name without enclosing < and />
+ * write part after special string
+ * otherwise
+ * write original compound_xsd
+ */
+ QCString cmp_org(compound_xsd);
+ QCString ins("<!-- Automatically insert here the HTML entities -->");
+ if (cmp_org.contains(QRegExp(ins)))
+ {
+ QCString xsd_txt;
+ QCString xsd_tmp;
+ QCString cmp_tmp1;
+ QCString cmp_tmp2;
+ QRegExp beg("^<");
+ QRegExp end("/>$");
+ cmp_tmp1 = cmp_org;
+ cmp_tmp1 = cmp_tmp1.replace(QRegExp(" *"+ins+".*"),"");
+ f.writeBlock(cmp_tmp1,qstrlen(cmp_tmp1));
+ int num_std = get_num_standard_symbols();
+ for (int i = 0; i < num_std; i++)
+ {
+ xsd_tmp = QCString(get_symbol_xml((DocSymbol::SymType)i));
+ if (xsd_tmp.contains(beg))
+ {
+ xsd_txt = " <xsd:element name=\"";
+ xsd_txt += xsd_tmp.replace(beg,"").replace(end,"");
+ xsd_txt += "\" type=\"docEmptyType\" />\n";
+ f.writeBlock(xsd_txt,qstrlen(xsd_txt));
+ }
+ }
+ cmp_tmp2 = cmp_org;
+ cmp_tmp2 = cmp_tmp2.replace(QRegExp(".*"+ins),"");
+ f.writeBlock(cmp_tmp2,qstrlen(cmp_tmp2));
+ }
+ else
+ {
+ f.writeBlock(compound_xsd,qstrlen(compound_xsd));
+ }
f.close();
fileName=outputDirectory+"/index.xml";