=================================================================== RCS file: /cvs/docbook2mdoc/docbook2mdoc.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -p -r1.35 -r1.36 --- docbook2mdoc/docbook2mdoc.c 2014/04/30 09:43:55 1.35 +++ docbook2mdoc/docbook2mdoc.c 2014/04/30 10:11:24 1.36 @@ -1,4 +1,4 @@ -/* $Id: docbook2mdoc.c,v 1.35 2014/04/30 09:43:55 kristaps Exp $ */ +/* $Id: docbook2mdoc.c,v 1.36 2014/04/30 10:11:24 kristaps Exp $ */ /* * Copyright (c) 2014 Kristaps Dzonsons * @@ -270,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... */ @@ -282,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; @@ -390,7 +392,10 @@ 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... */