From 963b8da31e03d149eefb9d61033db9f7263728da Mon Sep 17 00:00:00 2001 From: Sergei Izmailov Date: Sat, 13 Jun 2020 15:56:14 +0300 Subject: Add namespace inline flag in xml output (#7828) * Flag namespace as inline in xml output * Add inline namespace flag to innernamespace tag as well suggested by @mosra --- src/xmlgen.cpp | 7 +++++-- templates/xml/compound.xsd | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index 3a649e9..593f69a 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -1150,7 +1150,8 @@ static void writeInnerNamespaces(const NamespaceSDict *nl,FTextStream &t) if (!nd->isHidden() && !nd->isAnonymous()) { t << " getOutputFileBase() - << "\">" << convertToXML(nd->name()) << "" << endl; + << "\"" << (nd->isInline() ? " inline=\"yes\"" : "") + << ">" << convertToXML(nd->name()) << "" << endl; } } } @@ -1458,7 +1459,9 @@ static void generateXMLForNamespace(const NamespaceDef *nd,FTextStream &ti) writeXMLHeader(t); t << " getOutputFileBase() - << "\" kind=\"namespace\" language=\"" + << "\" kind=\"namespace\" " + << (nd->isInline()?"inline=\"yes\" ":"") + << "language=\"" << langToString(nd->getLanguage()) << "\">" << endl; t << " "; writeXMLString(t,nd->name()); diff --git a/templates/xml/compound.xsd b/templates/xml/compound.xsd index e17d2fa..4df19ce 100644 --- a/templates/xml/compound.xsd +++ b/templates/xml/compound.xsd @@ -43,6 +43,7 @@ + @@ -104,6 +105,7 @@ + -- cgit v0.12