summaryrefslogtreecommitdiff
path: root/SAX.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2000-06-30 17:58:25 +0000
committerDaniel Veillard <veillard@src.gnome.org>2000-06-30 17:58:25 +0000
commit3f6f7f64ce4c8e4d4a9b7dd4750bc24203a78dce (patch)
tree54727b81859cbfb7069c75d1d1980ad0b092c5f3 /SAX.c
parentc230410eadbada15092c04f92d01068af8a19f8d (diff)
downloadlibxml2-3f6f7f64ce4c8e4d4a9b7dd4750bc24203a78dce.tar.gz
- win32config.h.in: updated
- xmlversion.h.in: crap forgot to update this, this mean 2.1.0 lacks iconv support :-( need to release 2.1.1 - configure.in: release 2.1.1 - HTMLparser: fixed bug #14784 - xpath.c HTMLparser.c encoding.c parser.c: fix warning raised by Windows compiler - HTMLparser.c SAX.c HTMLtree.h tree.h: create HTML document in the SAX startDocument() callback. - TODO: updated - rebuild doc Daniel
Diffstat (limited to 'SAX.c')
-rw-r--r--SAX.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/SAX.c b/SAX.c
index ee3af393..68e2d316 100644
--- a/SAX.c
+++ b/SAX.c
@@ -574,13 +574,18 @@ startDocument(void *ctx)
#ifdef DEBUG_SAX
fprintf(stderr, "SAX.startDocument()\n");
#endif
- doc = ctxt->myDoc = xmlNewDoc(ctxt->version);
- if (doc != NULL) {
- if (ctxt->encoding != NULL)
- doc->encoding = xmlStrdup(ctxt->encoding);
- else
- doc->encoding = NULL;
- doc->standalone = ctxt->standalone;
+ if (ctxt->html) {
+ if (ctxt->myDoc == NULL)
+ ctxt->myDoc = htmlNewDoc(NULL, NULL);
+ } else {
+ doc = ctxt->myDoc = xmlNewDoc(ctxt->version);
+ if (doc != NULL) {
+ if (ctxt->encoding != NULL)
+ doc->encoding = xmlStrdup(ctxt->encoding);
+ else
+ doc->encoding = NULL;
+ doc->standalone = ctxt->standalone;
+ }
}
}