I did something like this using XML External entities. I have a file, called master.xml, which merges all of the files together. It
looks like this:
<?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE doxygengroup [
<!ENTITY IInterface1 SYSTEM "doxygen/xml/interfaceIInterface1.xml">
<!ENTITY IInterface2 SYSTEM "doxygen/xml/interfaceIInterface2.xml">
<!ENTITY IInterface3 SYSTEM "doxygen/xml/interfaceIInterface3.xml">
<!ENTITY IInterface4 SYSTEM "doxygen/xml/interfaceIInterface4.xml">
<!ENTITY IInterface5 SYSTEM "doxygen/xml/interfaceIInterface5.xml">
]>
<doxygengroup>
&IInterface1;
&IInterface2;
&IInterface3;
&IInterface4;
&IInterface5;
</doxygengroup>
At this point I would be able to transform master.xml using xsl stylesheets, except that each of the xml files generated by doxygen
has an xml header of the form <?xml ... ?> which I don't think should appear in an xml external entity; regardless, it isn't
accepted by my xsl transformer.
To solve this problem, I looked at the doxygen configuration variables available to control the xml header, but unfortunately there
isn't any to enable/disable the header. So I patched xmlgen.cpp to provide this for me (introduced new config var
XML_GENERATEHEADER). I don't know if the doxygen developers want to include this option in the main tree, but here it is (patch is
against the current HEAD version in cvs, 1.38) regardless:
c:\doxygen>diff -c xmlgen.cpp xmlgen-patched.cpp
*** xmlgen.cpp Wed Oct 30 12:57:52 2002
--- xmlgen-patched.cpp Tue Nov 12 14:28:08 2002
***************
*** 56,67 ****
{
QCString dtdName = Config_getString("XML_DTD");
QCString schemaName = Config_getString("XML_SCHEMA");
! t << "<?xml version='1.0' encoding='ISO-8859-1' 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())
--- 56,70 ----
{
QCString dtdName = Config_getString("XML_DTD");
QCString schemaName = Config_getString("XML_SCHEMA");
! if (Config_getBool("XML_GENERATEHEADER"))
{
! t << "<?xml version='1.0' encoding='ISO-8859-1' 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())
Regards,
--Cormac Twomey
----- Original Message -----
From: "Johan Eriksson" <joh...@ua...>
To: "doxygen-develop" <dox...@li...>
Sent: Monday, November 11, 2002 11:29 PM
Subject: Re: [Doxygen-develop] XML Output
>
> Kilian Kiko wrote:
> > Is it possible to get a single file output instead of a file per class?
> This is something that I have wondered about too. I would like to have
> the possibility to get it something like the RTF output, divided into
> sections and subsections, etc.
>
> Or does it exist a seperate tool that compile all the XML files into one
> large file, alternatively
> keeping the XML files but the tool compile it into one document a' la
> RTF while viewing or printing.
>
> /Regards,
> Johan
>
> > So that all classes are just separated through their compounddef tag?
> >
> >
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Doxygen-develop mailing list
> Dox...@li...
> https://lists.sourceforge.net/lists/listinfo/doxygen-develop
>
>
|