From 98f3d68cbea3367c00e5d5dc00fabd7ad024edf7 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 4 Jun 2020 17:22:00 +0200 Subject: [PATCH] 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. --- libnm/generate-docs-nm-property-infos.pl | 8 ++------ libnm/generate-docs-nm-settings-docs-merge.py | 2 +- man/nm-settings-ifcfg-rh.xsl | 4 ++-- man/nm-settings-keyfile.xsl | 2 +- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/libnm/generate-docs-nm-property-infos.pl b/libnm/generate-docs-nm-property-infos.pl index 540ecb6e6..bbdec3b63 100755 --- a/libnm/generate-docs-nm-property-infos.pl +++ b/libnm/generate-docs-nm-property-infos.pl @@ -131,17 +131,13 @@ sub process_data { # - XML handling - sub write_header { (my $header = - qq{ - - - + qq{ }) =~ s/^ {7}//mg; print {$fo} $header; } sub write_footer { - my $footer = ""; + my $footer = ""; print {$fo} $footer; } diff --git a/libnm/generate-docs-nm-settings-docs-merge.py b/libnm/generate-docs-nm-settings-docs-merge.py index 8aba67391..64f899ff1 100755 --- a/libnm/generate-docs-nm-settings-docs-merge.py +++ b/libnm/generate-docs-nm-settings-docs-merge.py @@ -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]) diff --git a/man/nm-settings-ifcfg-rh.xsl b/man/nm-settings-ifcfg-rh.xsl index e14b742fe..13f4ad6bc 100644 --- a/man/nm-settings-ifcfg-rh.xsl +++ b/man/nm-settings-ifcfg-rh.xsl @@ -8,7 +8,7 @@ - + - + nm-settings-ifcfg-rh diff --git a/man/nm-settings-keyfile.xsl b/man/nm-settings-keyfile.xsl index c22bd4fc0..c70228bbc 100644 --- a/man/nm-settings-keyfile.xsl +++ b/man/nm-settings-keyfile.xsl @@ -12,7 +12,7 @@ doctype-system="http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" /> - + nm-settings-keyfile