small typo pointed out by Mike Hommey slightly improved the --c14n
* xmlIO.c: small typo pointed out by Mike Hommey
* doc/xmllint.xml, xmllint.html, xmllint.1: slightly improved
the --c14n description, c.f. #144675 .
* nanohttp.c nanoftp.c: applied a first simple patch from
Mike Hommey for $no_proxy, c.f. #133470
* parserInternals.c include/libxml/parserInternals.h
include/libxml/xmlerror.h: cleanup to avoid 'error' identifier
in includes #
* parser.c SAX2.c debugXML.c include/libxml/parser.h:
first version of the inplementation of parsing within
the context of a node in the tree #142359, new function
xmlParseInNodeContext(), added support at the xmllint --shell
level as the "set" function
* test/scripts/set* result/scripts/* Makefile.am: extended
the script based regression tests to instrument the new function.
Daniel
diff --git a/SAX2.c b/SAX2.c
index 4a1c600..c705cc3 100644
--- a/SAX2.c
+++ b/SAX2.c
@@ -2042,10 +2042,8 @@
}
}
- if (ctxt->myDoc->children == NULL) {
+ if ((ctxt->myDoc->children == NULL) || (parent == NULL)) {
xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret);
- } else if (parent == NULL) {
- parent = ctxt->myDoc->children;
}
/*
* Build the namespace list