mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-02 22:38:01 +00:00
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:
parent
09f484ae9f
commit
98f3d68cbe
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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])
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue