summaryrefslogtreecommitdiffstats
path: root/src/xmlgen.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2003-07-08 20:06:16 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2003-07-08 20:06:16 (GMT)
commitaca0b88941aefecfbef3186e63049cc7fba0a11c (patch)
tree0ff0fae4a5be0021848d96eb18ee8505ff6b9b5d /src/xmlgen.cpp
parent509496da5e5b38aecbd91a5e20b3d695cbbef775 (diff)
downloadDoxygen-aca0b88941aefecfbef3186e63049cc7fba0a11c.zip
Doxygen-aca0b88941aefecfbef3186e63049cc7fba0a11c.tar.gz
Doxygen-aca0b88941aefecfbef3186e63049cc7fba0a11c.tar.bz2
Release-1.3.2-20030708
Diffstat (limited to 'src/xmlgen.cpp')
-rw-r--r--src/xmlgen.cpp29
1 files changed, 27 insertions, 2 deletions
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 7cef7d7..2f58fd4 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -47,6 +47,14 @@
// debug inside output
//#define XML_DB(x) QCString __t;__t.sprintf x;m_t << __t
+//------------------
+
+static const char index_xsd[] =
+#include "index_xsd.h"
+;
+
+//------------------
+
inline void writeXMLString(QTextStream &t,const char *s)
{
@@ -1448,16 +1456,33 @@ void generateXML()
}
}
QDir xmlDir(outputDirectory);
- QCString fileName=outputDirectory+"/index.xml";
+ QCString fileName=outputDirectory+"/index.xsd";
QFile f(fileName);
if (!f.open(IO_WriteOnly))
{
err("Cannot open file %s for writing!\n",fileName.data());
return;
}
+ f.writeBlock(index_xsd,strlen(index_xsd));
+ f.close();
+
+ fileName=outputDirectory+"/index.xml";
+ f.setName(fileName);
+ if (!f.open(IO_WriteOnly))
+ {
+ err("Cannot open file %s for writing!\n",fileName.data());
+ return;
+ }
QTextStream t(&f);
t.setEncoding(QTextStream::Latin1);
- writeXMLHeader(t);
+
+ // write index header
+ t << "<?xml version='1.0' encoding='" << theTranslator->idLanguageCharset()
+ << "' standalone='no'?>" << endl;;
+ t << "<doxygen xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
+ t << "xsi:noNamespaceSchemaLocation=\"index.xsd\" ";
+ t << "version=\"" << versionString << "\">" << endl;
+
ClassSDict::Iterator cli(Doxygen::classSDict);
ClassDef *cd;
for (cli.toFirst();(cd=cli.current());++cli)