=================================================================== RCS file: /cvs/docbook2mdoc/docbook2mdoc.c,v retrieving revision 1.34 retrieving revision 1.36 diff -u -p -r1.34 -r1.36 --- docbook2mdoc/docbook2mdoc.c 2014/04/30 09:37:26 1.34 +++ docbook2mdoc/docbook2mdoc.c 2014/04/30 10:11:24 1.36 @@ -1,4 +1,4 @@ -/* $Id: docbook2mdoc.c,v 1.34 2014/04/30 09:37:26 kristaps Exp $ */ +/* $Id: docbook2mdoc.c,v 1.36 2014/04/30 10:11:24 kristaps Exp $ */ /* * Copyright (c) 2014 Kristaps Dzonsons * @@ -111,6 +111,7 @@ static const struct node nodes[NODE__MAX] = { { "group", NODE_IGNTEXT }, { "holder", NODE_IGNTEXT }, { "info", NODE_IGNTEXT }, + { "informaltable", NODE_IGNTEXT }, { "itemizedlist", NODE_IGNTEXT }, { "link", 0 }, { "listitem", NODE_IGNTEXT }, @@ -269,7 +270,8 @@ xml_elem_start(void *arg, const XML_Char *name, const 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... */ @@ -281,6 +283,7 @@ xml_elem_start(void *arg, const XML_Char *name, const ps->node = ps->cur->node; } + for (node = 0; node < NODE__MAX; node++) if (NULL == nodes[node].name) continue; @@ -389,8 +392,11 @@ xml_elem_end(void *arg, const XML_Char *name) { 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... */ if (NODE_TEXT == ps->node) { @@ -1236,6 +1242,8 @@ pnode_print(struct parse *p, struct pnode *pn) fputs("Vt", stdout); break; case (NODE_TABLE): + /* FALLTHROUGH */ + case (NODE_INFORMALTABLE): assert(p->newln); pnode_printtable(p, pn); pnode_unlinksub(pn);