From e2830f1e65ddef63fc74a22addfea30d97ef8d65 Mon Sep 17 00:00:00 2001
From: Daniel Veillard
Date: Wed, 8 Jan 2003 17:47:49 +0000
Subject: [PATCH] preparing 2.5.1 release fixing XmlTextReader bug Daniel
* configure.in doc/* NEWS: preparing 2.5.1 release
* SAX.c parser.c: fixing XmlTextReader bug
Daniel
---
ChangeLog | 5 +++++
NEWS | 6 ++++++
SAX.c | 4 +++-
configure.in | 2 +-
doc/news.html | 6 ++++++
doc/xml.html | 8 ++++++++
doc/xmlio.html | 1 +
parser.c | 1 +
8 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f6e4c74b..4ac38b68 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Jan 8 18:32:25 CET 2003 Daniel Veillard
+
+ * configure.in doc/* NEWS: preparing 2.5.1 release
+ * SAX.c parser.c: fixing XmlTextReader bug
+
Wed Jan 8 00:13:01 CET 2003 Daniel Veillard
* SAX.c: fuck, I introduced a memory leak on external parsed
diff --git a/NEWS b/NEWS
index 372fa9f7..9aa98618 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,12 @@ to test those
+2.5.1: Jan 8 2003:
+ - Fixes a memory leak and configuration/compilation problems in 2.5.0
+ - documentation updates (John)
+ - a couple of XmlTextReader fixes
+
+
2.5.0: Jan 6 2003:
- New XmltextReader interface based on C#
API (with help of Stéphane Bidoul)
diff --git a/SAX.c b/SAX.c
index b297749c..84d7f6a2 100644
--- a/SAX.c
+++ b/SAX.c
@@ -374,7 +374,9 @@ getEntity(void *ctx, const xmlChar *name)
} else {
ret = xmlGetDocEntity(ctxt->myDoc, name);
}
- if ((ret != NULL) && (ctxt->validate) && (ret->children == NULL) &&
+ if ((ret != NULL) &&
+ ((ctxt->validate) || (ctxt->replaceEntities)) &&
+ (ret->children == NULL) &&
(ret->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY)) {
/*
* for validation purposes we really need to fetch and
diff --git a/configure.in b/configure.in
index f8bba4b5..62a96253 100644
--- a/configure.in
+++ b/configure.in
@@ -6,7 +6,7 @@ AC_CANONICAL_HOST
LIBXML_MAJOR_VERSION=2
LIBXML_MINOR_VERSION=5
-LIBXML_MICRO_VERSION=0
+LIBXML_MICRO_VERSION=1
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/news.html b/doc/news.html
index 5d949a63..fa5fdf94 100644
--- a/doc/news.html
+++ b/doc/news.html
@@ -104,6 +104,12 @@ to test those
Schemas and XInclude
+2.5.1: Jan 8 2003
+
+- Fixes a memory leak and configuration/compilation problems in 2.5.0
+ - documentation updates (John)
+ - a couple of XmlTextReader fixes
+
2.5.0: Jan 6 2003
- New XmltextReader interface based on C#
diff --git a/doc/xml.html b/doc/xml.html
index 189bd059..7c7f5e64 100644
--- a/doc/xml.html
+++ b/doc/xml.html
@@ -589,6 +589,13 @@ to test those
Schemas and XInclude
+2.5.1: Jan 8 2003
+
+ - Fixes a memory leak and configuration/compilation problems in 2.5.0
+ - documentation updates (John)
+ - a couple of XmlTextReader fixes
+
+
2.5.0: Jan 6 2003
- New XmltextReader interface based on C#
@@ -2792,6 +2799,7 @@ xmlOutputBufferCreateOwn(FILE *file, xmlCharEncodingHandlerPtr encoder) {
+
}
diff --git a/doc/xmlio.html b/doc/xmlio.html
index 2a76caa9..1bc20189 100644
--- a/doc/xmlio.html
+++ b/doc/xmlio.html
@@ -257,6 +257,7 @@ xmlOutputBufferCreateOwn(FILE *file, xmlCharEncodingHandlerPtr encoder) {
+
}
diff --git a/parser.c b/parser.c
index 79b46c0d..54159d3e 100644
--- a/parser.c
+++ b/parser.c
@@ -9477,6 +9477,7 @@ xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx, const xmlChar *URL,
ctxt = xmlCreateEntityParserCtxt(URL, ID, NULL);
if (ctxt == NULL) return(-1);
ctxt->userData = ctxt;
+ ctxt->_private = ctx->_private;
oldsax = ctxt->sax;
ctxt->sax = ctx->sax;
newDoc = xmlNewDoc(BAD_CAST "1.0");