rrichards Sun Jul 18 09:16:16 2004 EDT
Modified files:
/php-src/ext/dom document.c
Log:
MFB: add missing optional value param to createElementNS (chregu)
http://cvs.php.net/diff.php/php-src/ext/dom/document.c?r1=1.55&r2=1.56&ty=u
Index: php-src/ext/dom/document.c
diff -u php-src/ext/dom/document.c:1.55 php-src/ext/dom/document.c:1.56
--- php-src/ext/dom/document.c:1.55 Mon May 31 08:50:28 2004
+++ php-src/ext/dom/document.c Sun Jul 18 09:16:15 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: document.c,v 1.55 2004/05/31 12:50:28 rrichards Exp $ */
+/* $Id: document.c,v 1.56 2004/07/18 13:16:15 rrichards Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1063,7 +1063,7 @@
/* }}} end dom_document_import_node */
-/* {{{ proto DOMElement dom_document_create_element_ns(string namespaceURI, string
qualifiedName);
+/* {{{ proto DOMElement dom_document_create_element_ns(string namespaceURI, string
qualifiedName [,string value]);
URL:
http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-DocCrElNS
Since: DOM Level 2
*/
@@ -1073,13 +1073,13 @@
xmlDocPtr docp;
xmlNodePtr nodep = NULL;
xmlNsPtr nsptr = NULL;
- int ret, uri_len = 0, name_len = 0;
- char *uri, *name;
+ int ret, uri_len = 0, name_len = 0, value_len = 0;
+ char *uri, *name, *value = NULL;
char *localname = NULL, *prefix = NULL;
int errorcode;
dom_object *intern;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s",
&id, dom_document_class_entry, &uri, &uri_len, &name, &name_len) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
"Os!s|s", &id, dom_document_class_entry, &uri, &uri_len, &name, &name_len, &value,
&value_len) == FAILURE) {
return;
}
@@ -1089,7 +1089,7 @@
if (errorcode == 0) {
if (xmlValidateName((xmlChar *) localname, 0) == 0) {
- nodep = xmlNewDocNode (docp, NULL, localname, NULL);
+ nodep = xmlNewDocNode (docp, NULL, localname, value);
if (nodep != NULL && uri != NULL) {
nsptr = xmlSearchNsByHref (nodep->doc, nodep, uri);
if (nsptr == NULL) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php