From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (kristaps@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id s3UABOJG006273 for ; Wed, 30 Apr 2014 06:11:24 -0400 (EDT) Received: (from kristaps@localhost) by krisdoz.my.domain (8.14.5/8.14.3/Submit) id s3UABORf011466; Wed, 30 Apr 2014 06:11:24 -0400 (EDT) Date: Wed, 30 Apr 2014 06:11:24 -0400 (EDT) Message-Id: <201404301011.s3UABORf011466@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: kristaps@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: docbook2mdoc: Toss xi:include (crudely, til I figure out a better way). X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Toss xi:include (crudely, til I figure out a better way). Bump version. Modified Files: -------------- docbook2mdoc: Makefile docbook2mdoc.1 docbook2mdoc.c index.xml Revision Data ------------- Index: docbook2mdoc.1 =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/docbook2mdoc/docbook2mdoc.1,v retrieving revision 1.2 retrieving revision 1.3 diff -Ldocbook2mdoc.1 -Ldocbook2mdoc.1 -u -p -r1.2 -r1.3 --- docbook2mdoc.1 +++ docbook2mdoc.1 @@ -45,6 +45,8 @@ supports only well-formed XML DocBook V4 SGML DocBook documents may be parsed unless they contain SGML-specific constructs, such as empty end tags .Li . +The only non-DocBook construct recognised (and discarded) is +.Aq xi:include \(sl . .Sh EXIT STATUS .Ex -std .Sh EXAMPLES Index: docbook2mdoc.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/docbook2mdoc/docbook2mdoc.c,v retrieving revision 1.35 retrieving revision 1.36 diff -Ldocbook2mdoc.c -Ldocbook2mdoc.c -u -p -r1.35 -r1.36 --- docbook2mdoc.c +++ docbook2mdoc.c @@ -270,7 +270,8 @@ xml_elem_start(void *arg, const XML_Char struct pattr *pattr; const XML_Char **att; - if (ps->stop) + /* FIXME: find a better way to ditch other namespaces. */ + if (ps->stop || 0 == strcmp(name, "xi:include")) return; /* Close out text node, if applicable... */ @@ -282,6 +283,7 @@ xml_elem_start(void *arg, const XML_Char ps->node = ps->cur->node; } + for (node = 0; node < NODE__MAX; node++) if (NULL == nodes[node].name) continue; @@ -390,7 +392,10 @@ xml_elem_end(void *arg, const XML_Char * { struct parse *ps = arg; + /* FIXME: find a better way to ditch other namespaces. */ if (ps->stop || NODE_ROOT == ps->node) + return; + else if (0 == strcmp(name, "xi:include")) return; /* Close out text node, if applicable... */ Index: index.xml =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/docbook2mdoc/index.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -Lindex.xml -Lindex.xml -u -p -r1.7 -r1.8 --- index.xml +++ index.xml @@ -53,8 +53,8 @@ New in version @VERSION@...

- Now supports all tags as found in the RefDB tool, which claims to - have extensive DocBook documentation. + Now supports most tags as found in the OpenGL. + (Most because the <inlineequation> is missing for the moment.)