]> granicus.if.org Git - php/commitdiff
fix preserveWhiteSpace on document load
authorRob Richards <rrichards@php.net>
Wed, 24 Sep 2003 12:56:37 +0000 (12:56 +0000)
committerRob Richards <rrichards@php.net>
Wed, 24 Sep 2003 12:56:37 +0000 (12:56 +0000)
ext/dom/document.c

index 7f4d7683566d97c310906632807d8670b2dcf6b4..35b08074a0680a8a383288aef25f15d8ba87692e 100644 (file)
@@ -26,6 +26,7 @@
 #include "php.h"
 #if HAVE_LIBXML && HAVE_DOM
 #include "php_dom.h"
+#include <libxml/SAX.h>
 
 typedef struct _idsIterator idsIterator;
 struct _idsIterator {
@@ -1270,8 +1271,12 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source TSRMLS_DC)
 
        ctxt->vctxt.error = php_dom_ctx_error;
        ctxt->vctxt.warning = php_dom_ctx_error;
+
        if (ctxt->sax != NULL) {
                ctxt->sax->error = php_dom_ctx_error;
+               if (ctxt->keepBlanks == 0) {
+                       ctxt->sax->ignorableWhitespace = ignorableWhitespace;
+               }
        }
 
        xmlParseDocument(ctxt);