diff options
author | albert-github <albert.tests@gmail.com> | 2020-06-03 12:55:52 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2020-06-03 12:55:52 (GMT) |
commit | 88e70b5242b2446f33ab700e6d10e7f25ae2c349 (patch) | |
tree | e4c1bc4d115db7e8fd8404c77e83a595fe9c19e2 /src/xmlgen.cpp | |
parent | fd1111503cd3e403db3784d03530e6ec3ac37032 (diff) | |
download | Doxygen-88e70b5242b2446f33ab700e6d10e7f25ae2c349.zip Doxygen-88e70b5242b2446f33ab700e6d10e7f25ae2c349.tar.gz Doxygen-88e70b5242b2446f33ab700e6d10e7f25ae2c349.tar.bz2 |
Adding the xml:lang tag to XML and Docbook output
Adding the xml:lang attribute for XNL and Docbook output
Interesting links:
- language codes (different from country codes!): https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
- example for xml.xsd: http://www.java2s.com/Code/XML/XML-Schema/importanotherXMLschema.htm
Diffstat (limited to 'src/xmlgen.cpp')
-rw-r--r-- | src/xmlgen.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index 3a649e9..ec728c4 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -154,7 +154,9 @@ static void writeXMLHeader(FTextStream &t) t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>" << endl;; t << "<doxygen xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "; t << "xsi:noNamespaceSchemaLocation=\"compound.xsd\" "; - t << "version=\"" << getDoxygenVersion() << "\">" << endl; + t << "version=\"" << getDoxygenVersion() << "\" "; + t << "xml:lang=\"" << theTranslator->trISOLang() << "\""; + t << ">" << endl; } static void writeCombineScript() @@ -178,7 +180,7 @@ static void writeCombineScript() "<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" version=\"1.0\">\n" " <xsl:output method=\"xml\" version=\"1.0\" indent=\"no\" standalone=\"yes\" />\n" " <xsl:template match=\"/\">\n" - " <doxygen version=\"{doxygenindex/@version}\">\n" + " <doxygen version=\"{doxygenindex/@version}\" xml:lang=\"{doxygenindex/@xml:lang}\">\n" " <!-- Load all doxygen generated xml files -->\n" " <xsl:for-each select=\"doxygenindex/compound\">\n" " <xsl:copy-of select=\"document( concat( @refid, '.xml' ) )/doxygen/*\" />\n" @@ -1907,6 +1909,7 @@ void generateXML() QDir xmlDir(outputDirectory); createSubDirs(xmlDir); + ResourceMgr::instance().copyResource("xml.xsd",outputDirectory); ResourceMgr::instance().copyResource("index.xsd",outputDirectory); QCString fileName=outputDirectory+"/compound.xsd"; @@ -1959,7 +1962,9 @@ void generateXML() t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>" << endl;; t << "<doxygenindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "; t << "xsi:noNamespaceSchemaLocation=\"index.xsd\" "; - t << "version=\"" << getDoxygenVersion() << "\">" << endl; + t << "version=\"" << getDoxygenVersion() << "\" "; + t << "xml:lang=\"" << theTranslator->trISOLang() << "\""; + t << ">" << endl; { ClassSDict::Iterator cli(*Doxygen::classSDict); |