QDoc can generate DITA XML output .
In your configuration file, set your
outputformats
变量到
DITAXML
, and send the output to an appropriate directory:
outputdir = $QTDIR/doc/ditaxml outputformats = DITAXML
And include these macros in your configuration file to prevent QDoc from doing some escaping that doesn't validate in XML:
macro.aacute.DITAXML = "á" macro.Aring.DITAXML = "Å" macro.aring.DITAXML = "å" macro.Auml.DITAXML = "Ä" macro.br.DITAXML = " " macro.BR.DITAXML = " " macro.copyright.DITAXML = "©" macro.eacute.DITAXML = "é" macro.hr.DITAXML = " " macro.iacute.DITAXML = "í" macro.oslash.DITAXML = "ø" macro.ouml.DITAXML = "ö" macro.raisedaster.DITAXML = "<sup>*</sup>" macro.rarrow.DITAXML = "→" macro.reg.DITAXML = "<sup>®</sup>" macro.uuml.DITAXML = "ü" macro.mdash.DITAXML = "—" macro.emptyspan.DITAXML = " "
You can also set default values for some of the tags in the DITA
<prolog>
and
<metadata>
元素:
dita.metadata.default.author = Qt Development Frameworks dita.metadata.default.permissions = all dita.metadata.default.publisher = Qt Project dita.metadata.default.copyryear = 2018 dita.metadata.default.copyrholder = Qt Project dita.metadata.default.audience = programmer
见 \meta command for more details on DITA metadata.