On 12/09/2015 10:43 PM, Wei Li wrote: > 在 2015/12/8 22:57, Russell Bryant 写道: >> On 12/08/2015 01:06 AM, Wei Li wrote: >>> >>> 在 2015/12/7 23:30, Russell Bryant 写道: >>>> Can you update the man page, as well? >>>> >>> I would like to do this,but have a question >>> >>> There is a reference to /db-ctl-base.man/ in /ovn-sbctl.8.in/ implement >>> by "/.so lib/db-ctl-base.man/" >>> >>> but ovn-nbctl`s manpage is xml format >>> >>> How to add a reference to another manual page in xml file? >> Good question. I don't know of an example you can copy so we may have >> to create it. ovn-sbctl needs the same content, but is written in nroff >> instead of the XML format. >> >> Perhaps we need an XML equivalent to db-ctl-base.man and then include it >> using xi:include. >> >> ... >> <xi:include href="lib/db-ctl-base.xml"/> >> ... > xml2nroff use xml.dom.minidom to parse xml, does it support Xinclude? > > any one can provide a example?
It looks like xml.dom.minidom doesn't support it. We'd have to manually implement the interpretation of xi:include. That might be OK for our limited usage since we only care about href="" to a local file and not the full set of possible uses of xi:include. Otherwise, we'd have to switch to another XML parser. lxml supports it, but that'd be an external dependency, so I'd rather avoid it. From searching around it seems like xml.etree.ElementTree/ElementInclude from the Python stdlib is supposed to support this, but I haven't gotten it to work yet locally. -- Russell Bryant _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev