docs: unify "nm-property-infos-*.xml" and "nm-settings-docs-*.xml" (root element)

There is no need that two XML files that essentially hold similar
information are fundamentally different. Make them more alike.
This way, we can use the same tools that operate on either of
these input files.
This commit is contained in:
Thomas Haller 2020-06-04 17:22:00 +02:00
parent 09f484ae9f
commit 98f3d68cbe
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
4 changed files with 6 additions and 10 deletions

View file

@ -131,17 +131,13 @@ sub process_data {
# - XML handling -
sub write_header {
(my $header =
qq{<?xml version=\"1.0\"?>
<!DOCTYPE nm-$plugin-docs [
]>
<nm-$plugin-docs>
qq{<nm-setting-docs>
}) =~ s/^ {7}//mg;
print {$fo} $header;
}
sub write_footer {
my $footer = "</nm-$plugin-docs>";
my $footer = "</nm-setting-docs>";
print {$fo} $footer;
}

View file

@ -107,7 +107,7 @@ output_xml_file = sys.argv[1]
xml_roots = list([ET.parse(f).getroot() for f in sys.argv[2:]])
assert(all([root.tag.startswith('nm-') for root in xml_roots]))
assert(all([root.tag == 'nm-setting-docs' for root in xml_roots]))
settings_roots = list([node_to_dict(root, 'setting', 'name') for root in xml_roots])

View file

@ -8,7 +8,7 @@
<!-- We need to strip whitespaces so that position() function counts correctly.
http://www.oxygenxml.com/archives/xsl-list/200305/msg00430.html -->
<xsl:strip-space elements="nm-ifcfg-rh-docs setting" />
<xsl:strip-space elements="nm-setting-docs setting" />
<xsl:output
method="xml"
@ -16,7 +16,7 @@
doctype-system="http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
/>
<xsl:template match="nm-ifcfg-rh-docs">
<xsl:template match="nm-setting-docs">
<refentry id="nm-settings-ifcfg-rh">
<refentryinfo>
<title>nm-settings-ifcfg-rh</title>

View file

@ -12,7 +12,7 @@
doctype-system="http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
/>
<xsl:template match="nm-keyfile-docs">
<xsl:template match="nm-setting-docs">
<refentry id="nm-settings-keyfile">
<refentryinfo>
<title>nm-settings-keyfile</title>