source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* docbook2mdoc: Toss xi:include (crudely, til I figure out a better way).
@ 2014-04-30 10:11 kristaps
  0 siblings, 0 replies; only message in thread
From: kristaps @ 2014-04-30 10:11 UTC (permalink / raw)
  To: source

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@...
 			</h2>
 			<p>
-				Now supports all tags as found in the <a href="http://refdb.sourceforge.net/">RefDB</a> tool, which claims to
-				have extensive DocBook documentation.
+				Now supports most tags as found in the <a href="https://https://www.opengl.org/">OpenGL</a>.
+				(<q>Most</q> because the <code>&lt;inlineequation&gt;</code> is missing for the moment.)
 			</p>
 		</article>
 		<footer>
Index: Makefile
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/docbook2mdoc/Makefile,v
retrieving revision 1.13
retrieving revision 1.14
diff -LMakefile -LMakefile -u -p -r1.13 -r1.14
--- Makefile
+++ Makefile
@@ -1,4 +1,4 @@
-VERSION = 0.0.7
+VERSION = 0.0.8
 CFLAGS += -g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings 
 WWWPREFIX = /usr/vhosts/mdocml.bsd.lv/www/htdocs/docbook2mdoc
 PREFIX = /usr/local
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-04-30 10:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-30 10:11 docbook2mdoc: Toss xi:include (crudely, til I figure out a better way) kristaps

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).