cvs: php4 /ext/domxml php_domxml.c php_domxml.h

From: Date: Mon, 12 Aug 2002 13:11:50 +0000
Subject: cvs: php4 /ext/domxml php_domxml.c php_domxml.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-13276@lists.php.net to get a copy of this message
chregu Mon Aug 12 09:11:50 2002 EDT Modified files: /php4/ext/domxml php_domxml.c php_domxml.h Log: @ - Added $DomDocument->xinclude() for substitution of XIncludes in a DomDocument (chregu) Index: php4/ext/domxml/php_domxml.c diff -u php4/ext/domxml/php_domxml.c:1.184 php4/ext/domxml/php_domxml.c:1.185 --- php4/ext/domxml/php_domxml.c:1.184 Wed Aug 7 13:03:42 2002 +++ php4/ext/domxml/php_domxml.c Mon Aug 12 09:11:50 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_domxml.c,v 1.184 2002/08/07 17:03:42 jtate Exp $ */ +/* $Id: php_domxml.c,v 1.185 2002/08/12 13:11:50 chregu Exp $ */ /* TODO * - Support Notation Nodes @@ -284,6 +284,7 @@ PHP_FALIAS(new_xmldoc, domxml_new_xmldoc, NULL) PHP_FALIAS(domxml_dumpmem, domxml_dump_mem, NULL) PHP_FE(domxml_doc_validate, second_args_force_ref) + PHP_FE(domxml_doc_xinclude, NULL) {NULL, NULL, NULL} }; @@ -325,6 +326,7 @@ PHP_FALIAS(xptr_new_context, xptr_new_context, NULL) #endif PHP_FALIAS(validate, domxml_doc_validate, first_args_force_ref) + PHP_FALIAS(xinclude, domxml_doc_xinclude, NULL) {NULL, NULL, NULL} }; @@ -4782,6 +4784,27 @@ PHP_FUNCTION(domxml_version) { RETURN_STRING(LIBXML_DOTTED_VERSION, 1); +} +/* }}} */ + +/* {{{ proto int domxml_doc_xinclude() + Substitutues xincludes in a DomDocument */ +PHP_FUNCTION(domxml_doc_xinclude) +{ + zval *id; + xmlDoc *docp; + int err; + + DOMXML_PARAM_NONE(docp, id, le_domxmldocp); + + err = xmlXIncludeProcess (docp); + + if (err) { + RETVAL_LONG(err); + } else { + RETVAL_FALSE; + } + } /* }}} */ Index: php4/ext/domxml/php_domxml.h diff -u php4/ext/domxml/php_domxml.h:1.64 php4/ext/domxml/php_domxml.h:1.65 --- php4/ext/domxml/php_domxml.h:1.64 Sun Jul 7 13:19:29 2002 +++ php4/ext/domxml/php_domxml.h Mon Aug 12 09:11:50 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_domxml.h,v 1.64 2002/07/07 17:19:29 chregu Exp $ */ +/* $Id: php_domxml.h,v 1.65 2002/08/12 13:11:50 chregu Exp $ */ #ifndef PHP_DOMXML_H #define PHP_DOMXML_H @@ -105,6 +105,7 @@ PHP_FUNCTION(domxml_dump_mem_file); PHP_FUNCTION(domxml_dump_node); PHP_FUNCTION(domxml_doc_validate); +PHP_FUNCTION(domxml_doc_xinclude); #if defined(LIBXML_HTML_ENABLED) PHP_FUNCTION(domxml_html_dump_mem); #endif

« previous php.cvs (#13276) next »