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:
@@ -131,17 +131,13 @@ sub process_data {
|
|||||||
# - XML handling -
|
# - XML handling -
|
||||||
sub write_header {
|
sub write_header {
|
||||||
(my $header =
|
(my $header =
|
||||||
qq{<?xml version=\"1.0\"?>
|
qq{<nm-setting-docs>
|
||||||
<!DOCTYPE nm-$plugin-docs [
|
|
||||||
]>
|
|
||||||
|
|
||||||
<nm-$plugin-docs>
|
|
||||||
}) =~ s/^ {7}//mg;
|
}) =~ s/^ {7}//mg;
|
||||||
print {$fo} $header;
|
print {$fo} $header;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub write_footer {
|
sub write_footer {
|
||||||
my $footer = "</nm-$plugin-docs>";
|
my $footer = "</nm-setting-docs>";
|
||||||
print {$fo} $footer;
|
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:]])
|
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])
|
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.
|
<!-- We need to strip whitespaces so that position() function counts correctly.
|
||||||
http://www.oxygenxml.com/archives/xsl-list/200305/msg00430.html -->
|
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
|
<xsl:output
|
||||||
method="xml"
|
method="xml"
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
doctype-system="http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
|
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">
|
<refentry id="nm-settings-ifcfg-rh">
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>nm-settings-ifcfg-rh</title>
|
<title>nm-settings-ifcfg-rh</title>
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
doctype-system="http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
|
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">
|
<refentry id="nm-settings-keyfile">
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>nm-settings-keyfile</title>
|
<title>nm-settings-keyfile</title>
|
||||||
|
Reference in New Issue
Block a user