From c08a2c6fd41773f55853c5d93a67a932c61511e9 Mon Sep 17 00:00:00 2001
From: Daniel Veillard
Date: Wed, 8 Sep 1999 21:35:25 +0000
Subject: [PATCH] Bug fixes, improvement on ID/IDREF support, 1.6.2, no
memleaks, Daniel
---
ChangeLog | 12 ++
HACKING | 2 +-
HTMLparser.c | 2 +
SAX.c | 7 +-
configure.in | 2 +-
doc/xml.html | 4 +-
include/libxml/parserInternals.h | 3 +
include/libxml/tree.h | 18 ++
include/libxml/valid.h | 27 +++
include/libxml/xpath.h | 107 ++++++++++-
parser.c | 4 +-
parserInternals.h | 3 +
testXPath.c | 2 +-
tree.c | 2 +
tree.h | 18 ++
valid.c | 305 ++++++++++++++++++++++++++++++-
valid.h | 27 +++
xpath.c | 22 ++-
xpath.h | 107 ++++++++++-
19 files changed, 647 insertions(+), 27 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a60e0a73..e939c0c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+Wed Sep 8 22:46:14 CEST 1999 Daniel Veillard
+
+ * HTMLparser.c : cleanup
+ * SAX.c valid.c valid.h: added ID/IDREF checking
+ * tree.c tree.h: extended doc structure for refs
+ * configure.in: 1.6.2
+ * parser.c: patched bug in SAX user arg call
+ * parserInternals.h: patched missing close in C++ wrapping
+ * testXPath.c xpath.c xpath.h: prepared for extensibility,
+ especially upcoming XPointer implementation.
+ * doc/xml.html: augmented, typo
+
Sat Sep 4 22:48:05 CEST 1999 Timur Bakeyev
* doc/Makefile.am: replaced "install -d " with "mkinstalldirs" -
diff --git a/HACKING b/HACKING
index 6b702fa5..8f791bc0 100644
--- a/HACKING
+++ b/HACKING
@@ -15,7 +15,7 @@ mean that I'm on holliday or on the road.
The reasons I'm asking for an ask before commit policy is that I'm
using a separate CVS base for unstable developments and if you commit
a patch I didn't get, I may loose your change by mistake (it happened
-already once) and seriously complicatye my job of merging both bases.
+already once) and seriously complicates my job of merging both bases.
(The second base is at http://dev.w3.org/ under the XML module).
thanks in advance for following the rule,
diff --git a/HTMLparser.c b/HTMLparser.c
index adfa2d99..a559d9b7 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -1133,6 +1133,8 @@ htmlNewDoc(const CHAR *URI, const CHAR *ExternalID) {
cur->encoding = NULL;
cur->standalone = 1;
cur->compression = 0;
+ cur->ids = NULL;
+ cur->refs = NULL;
#ifndef XML_WITHOUT_CORBA
cur->_private = NULL;
cur->vepv = NULL;
diff --git a/SAX.c b/SAX.c
index 57443edf..d0c08fed 100644
--- a/SAX.c
+++ b/SAX.c
@@ -492,10 +492,13 @@ startDocument(void *ctx)
void
endDocument(void *ctx)
{
- /* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
#ifdef DEBUG_SAX
fprintf(stderr, "SAX.endDocument()\n");
#endif
+ if (ctxt->validate && ctxt->wellFormed &&
+ ctxt->myDoc && ctxt->myDoc->intSubset)
+ ctxt->valid &= xmlValidateDocumentFinal(&ctxt->vctxt, ctxt->myDoc);
}
/**
@@ -572,6 +575,8 @@ attribute(void *ctx, const CHAR *fullname, const CHAR *value)
*/
if (xmlIsID(ctxt->myDoc, ctxt->node, ret))
xmlAddID(&ctxt->vctxt, ctxt->myDoc, value, ret);
+ else if (xmlIsRef(ctxt->myDoc, ctxt->node, ret))
+ xmlAddRef(&ctxt->vctxt, ctxt->myDoc, value, ret);
}
if (name != NULL)
diff --git a/configure.in b/configure.in
index 7d33d2b8..49d57083 100644
--- a/configure.in
+++ b/configure.in
@@ -5,7 +5,7 @@ AM_CONFIG_HEADER(config.h)
LIBXML_MAJOR_VERSION=1
LIBXML_MINOR_VERSION=6
-LIBXML_MICRO_VERSION=1
+LIBXML_MICRO_VERSION=2
LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION
LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION
diff --git a/doc/xml.html b/doc/xml.html
index 49e08997..a5afae11 100644
--- a/doc/xml.html
+++ b/doc/xml.html
@@ -529,7 +529,7 @@ core.
Model this is an API for accessing XML or HTML structured documents.
Native support for DOM in Gnome is on the way (module gnome-dom), and it will
be based on gnome-xml. This will be a far cleaner interface to manipulate XML
-files within Gnome since it won't expose the internal structure. DOM defiles a
+files within Gnome since it won't expose the internal structure. DOM defines a
set of IDL (or Java) interfaces allowing to traverse and manipulate a
document. The DOM library will allow accessing and modifying "live" documents
presents on other programs like this:
@@ -747,6 +747,6 @@ base under gnome-xml/example
Daniel Veillard
-$Id$
+$Id: xml.html,v 1.7 1999/09/04 18:27:23 veillard Exp $