1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-30 22:43:14 +03:00

added a small hack to fix interference between my fixes for bugs 132585

* xinclude.c: added a small hack to fix interference between
  my fixes for bugs 132585 and 132588.
* python/libxml.c: fixed problem with serialization of namespace
  reported on the mailing list by Anthony Carrico
This commit is contained in:
William M. Brack
2004-02-08 04:12:49 +00:00
parent 6bdacd7aee
commit 95af594b0b
3 changed files with 16 additions and 2 deletions

View File

@ -1,3 +1,10 @@
Sun Feb 8 12:09:55 HKT 2004 William Brack <wbrack@mmm.com.hk>
* xinclude.c: added a small hack to fix interference between
my fixes for bugs 132585 and 132588.
* python/libxml.c: fixed problem with serialization of namespace
reported on the mailing list by Anthony Carrico
Sat Feb 7 16:53:11 HKT 2004 William Brack <wbrack@mmm.com.hk> Sat Feb 7 16:53:11 HKT 2004 William Brack <wbrack@mmm.com.hk>
* xinclude.c: fixed problem with function xmlXIncludeCopyRange * xinclude.c: fixed problem with function xmlXIncludeCopyRange

View File

@ -2473,7 +2473,10 @@ libxml_serializeNode(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
(void) xmlOutputBufferClose(buf); (void) xmlOutputBufferClose(buf);
py_retval = libxml_charPtrWrap((char *) c_retval); py_retval = libxml_charPtrWrap((char *) c_retval);
} else { } else {
doc = node->doc; if (node->type == XML_NAMESPACE_DECL)
doc = NULL;
else
doc = node->doc;
if ((doc == NULL) || (doc->type == XML_DOCUMENT_NODE)) { if ((doc == NULL) || (doc->type == XML_DOCUMENT_NODE)) {
xmlOutputBufferPtr buf; xmlOutputBufferPtr buf;
xmlCharEncodingHandlerPtr handler = NULL; xmlCharEncodingHandlerPtr handler = NULL;

View File

@ -58,6 +58,7 @@ struct _xmlXIncludeRef {
int xml; /* xml or txt */ int xml; /* xml or txt */
int count; /* how many refs use that specific doc */ int count; /* how many refs use that specific doc */
xmlXPathObjectPtr xptr; /* the xpointer if needed */ xmlXPathObjectPtr xptr; /* the xpointer if needed */
int emptyFb; /* flag to show fallback empty */
}; };
struct _xmlXIncludeCtxt { struct _xmlXIncludeCtxt {
@ -1795,6 +1796,7 @@ xmlXIncludeLoadFallback(xmlXIncludeCtxtPtr ctxt, xmlNodePtr fallback, int nr) {
ctxt->incTab[nr]->inc = xmlCopyNodeList(fallback->children); ctxt->incTab[nr]->inc = xmlCopyNodeList(fallback->children);
} else { } else {
ctxt->incTab[nr]->inc = NULL; ctxt->incTab[nr]->inc = NULL;
ctxt->incTab[nr]->emptyFb = 1; /* flag empty callback */
} }
return(ret); return(ret);
} }
@ -2208,7 +2210,9 @@ xmlXIncludeDoProcess(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr tree) {
* *
*/ */
for (i = ctxt->incBase;i < ctxt->incNr; i++) { for (i = ctxt->incBase;i < ctxt->incNr; i++) {
if ((ctxt->incTab[i]->inc != NULL) || (ctxt->incTab[i]->xptr != NULL)) if ((ctxt->incTab[i]->inc != NULL) ||
(ctxt->incTab[i]->xptr != NULL) ||
(ctxt->incTab[i]->emptyFb != 0)) /* (empty fallback) */
xmlXIncludeIncludeNode(ctxt, i); xmlXIncludeIncludeNode(ctxt, i);
} }