aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2008-12-07 23:44:19 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2008-12-07 23:44:19 +0000
commit2e8f242a67a04a512eae753f614e6bca2fdb595a (patch)
tree6de7fcff320a130ca9b746eed80cc4576c4ad085
parent97ce52b73db0ab7a5fc1b915e913624b2531f9ca (diff)
downloadmandoc-2e8f242a67a04a512eae753f614e6bca2fdb595a.tar.gz
mandoc-2e8f242a67a04a512eae753f614e6bca2fdb595a.tar.zst
mandoc-2e8f242a67a04a512eae753f614e6bca2fdb595a.zip
*** empty log message ***
-rw-r--r--Makefile26
-rw-r--r--index.752
-rw-r--r--xml.c5
3 files changed, 49 insertions, 34 deletions
diff --git a/Makefile b/Makefile
index d842dd9c..e8d71071 100644
--- a/Makefile
+++ b/Makefile
@@ -7,23 +7,29 @@ CFLAGS += -W -Wall -Wno-unused-parameter -g -DDEBUG
LINTFLAGS += -c -e -f -u
-LNS = mdocml.ln html.ln xml.ln libmdocml.ln roff.ln ml.ln mlg.ln compat.ln tokens.ln literals.ln
+LNS = mdocml.ln html.ln xml.ln libmdocml.ln roff.ln ml.ln mlg.ln \
+ compat.ln tokens.ln literals.ln
LLNS = llib-lmdocml.ln
LIBS = libmdocml.a
-OBJS = mdocml.o html.o xml.o libmdocml.o roff.o ml.o mlg.o compat.o tokens.o literals.o
+OBJS = mdocml.o html.o xml.o libmdocml.o roff.o ml.o mlg.o \
+ compat.o tokens.o literals.o
-SRCS = mdocml.c html.c xml.c libmdocml.c roff.c ml.c mlg.c compat.c tokens.c literals.c
+SRCS = mdocml.c html.c xml.c libmdocml.c roff.c ml.c mlg.c \
+ compat.c tokens.c literals.c
HEADS = libmdocml.h private.h ml.h roff.h
MANS = mdocml.1 index.7
-HTML = index.html mdocml.html
+HTML = index.html mdocml.html
-CLEAN = mdocml mdocml.tgz $(LLNS) $(LNS) $(OBJS) $(LIBS) $(HTML)
+XML = index.xml
+
+CLEAN = mdocml mdocml.tgz $(LLNS) $(LNS) $(OBJS) $(LIBS) $(HTML) \
+ $(XML)
INSTALL = Makefile $(HEADS) $(SRCS) $(MANS)
@@ -44,7 +50,7 @@ lint: llib-lmdocml.ln
dist: mdocml.tgz
-www: $(HTML)
+www: $(HTML) $(XML)
regress: mdocml
@for f in $(FAIL); do \
@@ -65,12 +71,16 @@ clean:
index.html: index.7 mdocml.css
./mdocml -W -fhtml -e -o $@ index.7
+index.xml: index.7 mdocml.css
+ ./mdocml -W -fhtml -e -o $@ index.7
+
mdocml.html: mdocml.1 mdocml.css
./mdocml -W -fhtml -e -o $@ mdocml.1
install-www: www dist
- install -m 0644 mdocml.tgz $(PREFIX)/
- install -m 0644 $(HTML) $(PREFIX)/
+ install -m 0644 mdocml.tgz $(PREFIX)/mdocml-$(VERSION).tgz
+ ( cd $(PREFIX)/ && ln -sf mdocml-$(VERSION).tgz mdocml.tgz )
+ install -m 0644 $(HTML) $(XML) $(PREFIX)/
mdocml.tgz: $(INSTALL)
mkdir -p .dist/mdocml/mdocml-$(VERSION)/
diff --git a/index.7 b/index.7
index 3baf4304..f120efcb 100644
--- a/index.7
+++ b/index.7
@@ -19,8 +19,19 @@ into XML or HTML documents. Unlike other similar utilities such as
and
.Xr man2html 1 ,
.Nm
-acts directly on source documents, validating its input and producing a
-variety of outputs.
+is a full macro parser operating on source documents, specifically mdoc,
+validating input and compiling to HTML and XML output types.
+.Pp
+The
+.Nm
+utility is tested specifically on
+.Ox
+manual sources as compiled and invoked both on
+.Ox
+and Linux.
+.Nm
+is
+.Ud
.\"
.Ss Validation
In order to operate sanely,
@@ -30,47 +41,35 @@ following checks:
.Pp
.Bl -enum -compact
.It
-special characters (such as
+valid special characters (such as
.Sq \en
and
.Sq \et ) ,
.It
-macro scope (such as
+sane macro scope (such as
.Sq \&.Sh
macros clobbering a pending
.Sq \&.Bl
scope),
.It
-predefined characters (such as \\*(>= and \\*q),
+valid predefined characters (such as \\*(>= and \\*q),
.It
correctly-ordered document prelude,
.It
-sane argument values (such as those for
+sane macro argument values (such as those for
.Sq \&.Dt
or
.Sq \&.Sm ) ,
.It
and so on.
.El
-.Pp
-The
-.Nm
-utility has been tested under Linux and
-.Ox ,
-specifically on
-.Ox
-manual source.
-.Nm
-is
-.Ud
.\"
.Ss Filtering
-When a block of source has been verified, it's passed to the front-end
-fitlers, which format and display data. The
-.Nm
-utility is invoked with a filter by the
-.Fl f
-flag. The HTML filter has the following features:
+When a line of source has been parsed, it's passed to the output
+filters, which format and display data. The two available filters are
+HTML and XML.
+.Pp
+The HTML filter has the following features:
.Pp
.Bl -enum -compact
.It
@@ -92,7 +91,9 @@ The XML filter creates a correct XML tree with
and
.Dq inline
namespaces corresponding to macro categories. Namespace identifiers
-correspond to their definitions.
+correspond to their definitions. A sample is available at
+http://mdocml.bsd.lv/index.xml
+.Ns .
.\"
.Sh DOWNLOADS
Download
@@ -102,6 +103,9 @@ at http://mdocml.bsd.lv/mdocml.tgz
.\" - UPDATE ME WITH EVERY RELEASE. ----------------------------------
The current version is 1.0.0, dated 08/12/2008.
.\" ------------------------------------------------------------------
+.Pp
+Previous versions are archived as mdocml-x.y.z.tgz, with the appropriate
+versions filled in.
.\"
.Sh DOCUMENTS
The manual for
diff --git a/xml.c b/xml.c
index 16582027..2a722299 100644
--- a/xml.c
+++ b/xml.c
@@ -1,4 +1,4 @@
-/* $Id: xml.c,v 1.18 2008/12/07 21:30:49 kristaps Exp $ */
+/* $Id: xml.c,v 1.19 2008/12/07 23:44:19 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -131,7 +131,8 @@ xml_begin(struct md_mbuf *mbuf, const struct md_args *args,
"encoding=\"UTF-8\"?>\n", NULL))
return(0);
return(ml_puts(mbuf, "<mdoc xmlns:block=\"block\" "
- "xmlns:special=\"special\" "
+ "xmlns:body=\"body\" "
+ "xmlns:head=\"head\" "
"xmlns:inline=\"inline\">", NULL));
}