rrichards Sun Jan 2 07:22:36 2005 EDT
Modified files:
/php-src/ext/dom document.c
Log:
allow parser flags to be passed to xinclude()
http://cvs.php.net/diff.php/php-src/ext/dom/document.c?r1=1.62&r2=1.63&ty=u
Index: php-src/ext/dom/document.c
diff -u php-src/ext/dom/document.c:1.62 php-src/ext/dom/document.c:1.63
--- php-src/ext/dom/document.c:1.62 Sun Dec 5 07:01:44 2004
+++ php-src/ext/dom/document.c Sun Jan 2 07:22:36 2005
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: document.c,v 1.62 2004/12/05 12:01:44 rrichards Exp $ */
+/* $Id: document.c,v 1.63 2005/01/02 12:22:36 rrichards Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1743,23 +1743,27 @@
}
}
-/* {{{ proto int dom_document_xinclude()
+/* {{{ proto int dom_document_xinclude([int options])
Substitutues xincludes in a DomDocument */
PHP_FUNCTION(dom_document_xinclude)
{
zval *id;
xmlDoc *docp;
xmlNodePtr root;
- int err;
+ int err, flags = 0;
dom_object *intern;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
"O", &id, dom_document_class_entry) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
"O|l", &id, dom_document_class_entry, &flags) == FAILURE) {
return;
}
DOM_GET_OBJ(docp, id, xmlDocPtr, intern);
+#if LIBXML_VERSION >= 20600
+ err = xmlXIncludeProcessFlags(docp, flags);
+#else
err = xmlXIncludeProcess (docp);
+#endif
/* XML_XINCLUDE_START and XML_XINCLUDE_END nodes need to be removed as
these
are added via xmlXIncludeProcess to mark beginning and ending of
xincluded document
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php