summaryrefslogtreecommitdiffstats
path: root/src/xmlgen.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2003-10-19 20:02:00 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2003-10-19 20:02:00 (GMT)
commite6a16d09de26a40fd7730ba44a740b713b157191 (patch)
tree7c0bc962cb1a9002dc9a21006dd8be4f49cd9c7c /src/xmlgen.cpp
parenta139a43323607b05f0f749d3c7d8734bb7a47768 (diff)
downloadDoxygen-e6a16d09de26a40fd7730ba44a740b713b157191.zip
Doxygen-e6a16d09de26a40fd7730ba44a740b713b157191.tar.gz
Doxygen-e6a16d09de26a40fd7730ba44a740b713b157191.tar.bz2
Release-1.3.4-20031019
Diffstat (limited to 'src/xmlgen.cpp')
-rw-r--r--src/xmlgen.cpp52
1 files changed, 34 insertions, 18 deletions
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 8db7993..ec3bc47 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -88,24 +88,6 @@ inline void writeXMLCodeString(QTextStream &t,const char *s)
static void writeXMLHeader(QTextStream &t)
{
- //QCString dtdName = Config_getString("XML_DTD");
- //QCString schemaName = Config_getString("XML_SCHEMA");
- //t << "<?xml version='1.0' encoding='" << theTranslator->idLanguageCharset()
- // << "' standalone='";
- //if (dtdName.isEmpty() && schemaName.isEmpty()) t << "yes"; else t << "no";
- //t << "'?>" << endl;
- //if (!dtdName.isEmpty())
- //{
- // t << "<!DOCTYPE doxygen SYSTEM \"doxygen.dtd\">" << endl;
- //}
- //t << "<doxygen ";
- //if (!schemaName.isEmpty())
- //{
- // t << "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
- // t << "xsi:noNamespaceSchemaLocation=\"doxygen.xsd\" ";
- //}
- //t << "version=\"" << versionString << "\">" << endl;
-
t << "<?xml version='1.0' encoding='" << theTranslator->idLanguageCharset()
<< "' standalone='no'?>" << endl;;
t << "<doxygen xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
@@ -113,6 +95,38 @@ static void writeXMLHeader(QTextStream &t)
t << "version=\"" << versionString << "\">" << endl;
}
+static void writeCombineScript()
+{
+ QCString outputDirectory = Config_getString("XML_OUTPUT");
+ QCString fileName=outputDirectory+"/combine.xslt";
+ QFile f(fileName);
+ if (!f.open(IO_WriteOnly))
+ {
+ err("Cannot open file %s for writing!\n",fileName.data());
+ return;
+ }
+ QTextStream t(&f);
+ t.setEncoding(QTextStream::Latin1);
+
+ t <<
+ "<!-- XSLT script to combine the generated output into a single file. \n"
+ " If you have xsltproc you could use:\n"
+ " xsltproc combine.xslt index.xml >all.xml\n"
+ "-->\n"
+ "<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" version=\"1.0\">\n"
+ " <xsl:output method=\"xml\" version=\"1.0\" indent=\"yes\" standalone=\"yes\" />\n"
+ " <xsl:template match=\"/\">\n"
+ " <doxygen version=\"{doxygenindex/@version}\">\n"
+ " <!-- Load all doxgen generated xml files -->\n"
+ " <xsl:for-each select=\"doxygenindex/compound\">\n"
+ " <xsl:copy-of select=\"document( concat( @refid, '.xml' ) )/doxygen/*\" />\n"
+ " </xsl:for-each>\n"
+ " </doxygen>\n"
+ " </xsl:template>\n"
+ "</xsl:stylesheet>\n";
+
+}
+
void writeXMLLink(QTextStream &t,const char *extRef,const char *compoundId,
const char *anchorId,const char *text)
{
@@ -1569,6 +1583,8 @@ void generateXML()
//t << " </compoundlist>" << endl;
t << "</doxygenindex>" << endl;
+
+ writeCombineScript();
}