summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorWei Li <liw@dtdream.com>2016-01-12 09:35:06 +0800
committerRussell Bryant <russell@ovn.org>2016-01-12 10:43:39 -0500
commit7ba0c32f610ef16729e081efe140a0ea4661736d (patch)
treee37ff00b91aadcfa584362506efe97e69bc6b744 /build-aux
parente807a1a63d1176bce97071063fa480eb68662dc6 (diff)
downloadopenvswitch-7ba0c32f610ef16729e081efe140a0ea4661736d.tar.gz
ovn-nbctl: add db commands help and manpage
db-ctl-base: add xml format db help xml2nroff: support xinclude Submitted-at: https://github.com/openvswitch/ovs/pull/93 Signed-off-by: l0310 <liw@dtdream.com> [russell@ovn.org updated lib/automake.mk] Signed-off-by: Russell Bryant <russell@ovn.org>
Diffstat (limited to 'build-aux')
-rwxr-xr-xbuild-aux/xml2nroff9
1 files changed, 9 insertions, 0 deletions
diff --git a/build-aux/xml2nroff b/build-aux/xml2nroff
index 00ef649f1..01e79f140 100755
--- a/build-aux/xml2nroff
+++ b/build-aux/xml2nroff
@@ -47,6 +47,15 @@ def manpage_to_nroff(xml_file, subst, version=None):
content = content.replace(k, v)
doc = xml.dom.minidom.parseString(content).documentElement
+ xi_nodes = doc.getElementsByTagName("xi:include")
+ for node in xi_nodes:
+ with open(node.getAttribute("href")) as xi_f:
+ content = xi_f.read()
+ for k, v in subst.iteritems():
+ content = content.replace(k, v)
+ xi_doc = xml.dom.minidom.parseString(content).documentElement
+ doc.replaceChild(xi_doc, node)
+
if version is None:
version = "UNKNOWN"
program = doc.attributes['program'].nodeValue