-/* $Id: xml.c,v 1.18 2008/12/07 21:30:49 kristaps Exp $ */
+/* $Id: xml.c,v 1.23 2008/12/10 10:43:57 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
#include <stdlib.h>
#include <string.h>
-#include "libmdocml.h"
#include "private.h"
#include "ml.h"
const struct md_args *,
const struct tm *,
const char *, const char *,
- const char *, const char *);
+ enum roffmsec, enum roffvol);
static int xml_end(struct md_mbuf *,
const struct md_args *);
static ssize_t xml_printtagname(struct md_mbuf *,
if ( ! ml_nputs(mbuf, " ", 1, &res))
return(-1);
+ /* FIXME: should puke on some, no? */
+
if ( ! ml_puts(mbuf, tokargnames[c], &res))
return(-1);
if ( ! ml_nputs(mbuf, "=\"", 2, &res))
static int
xml_begin(struct md_mbuf *mbuf, const struct md_args *args,
const struct tm *tm, const char *os,
- const char *title, const char *section,
- const char *vol)
+ const char *title, enum roffmsec sec, enum roffvol vol)
{
if ( ! ml_puts(mbuf, "<?xml version=\"1.0\" "
"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));
}
xml_alloc(void **p)
{
+ *p = NULL;
return(1);
}