From: Christian Stocker Date: Mon, 27 Oct 2003 15:32:22 +0000 (+0000) Subject: xinclude support readded to ext/dom X-Git-Tag: RELEASE_2_0_0RC1~48 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3cd8d4a8653a048d055c926a31ce3f88ee76ff59;p=php xinclude support readded to ext/dom --- diff --git a/ext/dom/document.c b/ext/dom/document.c index 9e56a62bee..bb19a92577 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -81,6 +81,7 @@ zend_function_entry php_dom_document_class_functions[] = { PHP_FALIAS(saveXML, dom_document_savexml, NULL) PHP_FALIAS(domdocument, dom_document_document, NULL) PHP_FALIAS(validate, dom_document_validate, NULL) + PHP_FALIAS(xinclude, dom_document_xinclude, NULL) #if defined(LIBXML_HTML_ENABLED) PHP_FALIAS(loadHTML, dom_document_load_html, NULL) PHP_FALIAS(loadHTMLFile, dom_document_load_html_file, NULL) @@ -1511,6 +1512,28 @@ PHP_FUNCTION(dom_document_savexml) } /* }}} end dom_document_savexml */ +/* {{{ proto int dom_document_xinclude() + Substitutues xincludes in a DomDocument */ +PHP_FUNCTION(dom_document_xinclude) +{ + zval *id; + xmlDoc *docp; + int err; + dom_object *intern; + + DOM_GET_THIS_OBJ(docp, id, xmlDocPtr, intern); + + err = xmlXIncludeProcess (docp); + + if (err) { + RETVAL_LONG(err); + } else { + RETVAL_FALSE; + } + +} + + /* {{{ proto string domnode dom_document_validate(); Since: DOM extended */ diff --git a/ext/dom/dom_fe.h b/ext/dom/dom_fe.h index c5a8b450c3..26edda384e 100644 --- a/ext/dom/dom_fe.h +++ b/ext/dom/dom_fe.h @@ -126,6 +126,7 @@ PHP_FUNCTION(dom_document_save); PHP_FUNCTION(dom_document_loadxml); PHP_FUNCTION(dom_document_savexml); PHP_FUNCTION(dom_document_validate); +PHP_FUNCTION(dom_document_xinclude); #if defined(LIBXML_HTML_ENABLED) PHP_FUNCTION(dom_document_load_html);