]> granicus.if.org Git - php/commitdiff
mark more functions unicode safe
authorRob Richards <rrichards@php.net>
Fri, 8 Dec 2006 16:28:33 +0000 (16:28 +0000)
committerRob Richards <rrichards@php.net>
Fri, 8 Dec 2006 16:28:33 +0000 (16:28 +0000)
add tests

21 files changed:
ext/dom/documentfragment.c
ext/dom/domconfiguration.c
ext/dom/domerrorhandler.c
ext/dom/domimplementation.c
ext/dom/domimplementationlist.c
ext/dom/domimplementationsource.c
ext/dom/domstringlist.c
ext/dom/entityreference.c
ext/dom/namednodemap.c
ext/dom/namelist.c
ext/dom/node.c
ext/dom/processinginstruction.c
ext/dom/string_extend.c
ext/dom/tests/domattributes.phpt
ext/dom/tests/domelement.phpt
ext/dom/tests/domfragment.phpt [new file with mode: 0644]
ext/dom/tests/domimplementation.phpt [new file with mode: 0644]
ext/dom/tests/dompi.phpt [new file with mode: 0644]
ext/dom/text.c
ext/dom/userdatahandler.c
ext/dom/xpath.c

index b412bd9e8a3c5aeb60fe84bf0ad36fbdbbd7ff4c..e18adb32bb58ee628132ecd53b39793fc25e011d 100644 (file)
@@ -41,7 +41,7 @@ zend_function_entry php_dom_documentfragment_class_functions[] = {
        {NULL, NULL, NULL}
 };
 
-/* {{{ proto void DOMDocumentFragment::__construct(); */
+/* {{{ proto void DOMDocumentFragment::__construct() U */
 PHP_METHOD(domdocumentfragment, __construct)
 {
 
@@ -107,7 +107,7 @@ static void php_dom_xmlSetTreeDoc(xmlNodePtr tree, xmlDocPtr doc) {
     }
 }
 
-/* {{{ proto void DOMDocumentFragment::appendXML(string data); */
+/* {{{ proto void DOMDocumentFragment::appendXML(string data) U */
 PHP_METHOD(domdocumentfragment, appendXML) {
        zval *id;
        xmlNode *nodep;
index 227fc6ce366898f7e0088cd1bb4150c2bd6761e3..a17ca652c865b0a4e9ec94984ae001cca7470ccd 100644 (file)
@@ -45,7 +45,7 @@ zend_function_entry php_dom_domconfiguration_class_functions[] = {
 /* {{{ attribute protos, not implemented yet */
 
 
-/* {{{ proto dom_void dom_domconfiguration_set_parameter(string name, domuserdata value);
+/* {{{ proto dom_void dom_domconfiguration_set_parameter(string name, domuserdata value) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMConfiguration-property
 Since: 
 */
@@ -56,7 +56,7 @@ PHP_FUNCTION(dom_domconfiguration_set_parameter)
 /* }}} end dom_domconfiguration_set_parameter */
 
 
-/* {{{ proto domdomuserdata dom_domconfiguration_get_parameter(string name);
+/* {{{ proto domdomuserdata dom_domconfiguration_get_parameter(string name) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMConfiguration-getParameter
 Since: 
 */
@@ -67,7 +67,7 @@ PHP_FUNCTION(dom_domconfiguration_get_parameter)
 /* }}} end dom_domconfiguration_get_parameter */
 
 
-/* {{{ proto boolean dom_domconfiguration_can_set_parameter(string name, domuserdata value);
+/* {{{ proto boolean dom_domconfiguration_can_set_parameter(string name, domuserdata value) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMConfiguration-canSetParameter
 Since: 
 */
index 7905167531216dc42105a126b09cf6e98924c9c4..f113466f956acf229e40d039a2f6d0be2d75b2f4 100644 (file)
@@ -43,7 +43,7 @@ zend_function_entry php_dom_domerrorhandler_class_functions[] = {
 /* {{{ attribute protos, not implemented yet */
 
 
-/* {{{ proto dom_boolean dom_domerrorhandler_handle_error(domerror error);
+/* {{{ proto dom_boolean dom_domerrorhandler_handle_error(domerror error) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-ERRORS-DOMErrorHandler-handleError
 Since: 
 */
index e1218f0a736b22426a9b4df8fcbc255ac6002eb6..88b38ba87869068158285972bb8bb6eaec049f5a 100644 (file)
@@ -42,7 +42,7 @@ zend_function_entry php_dom_domimplementation_class_functions[] = {
        {NULL, NULL, NULL}
 };
 
-/* {{{ proto boolean dom_domimplementation_has_feature(string feature, string version);
+/* {{{ proto boolean dom_domimplementation_has_feature(string feature, string version)
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-5CED94D7
 Since: 
 */
@@ -64,7 +64,7 @@ PHP_METHOD(domimplementation, hasFeature)
 /* }}} end dom_domimplementation_has_feature */
 
 
-/* {{{ proto DOMDocumentType dom_domimplementation_create_document_type(string qualifiedName, string publicId, string systemId);
+/* {{{ proto DOMDocumentType dom_domimplementation_create_document_type(string qualifiedName, string publicId, string systemId) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Level-2-Core-DOM-createDocType
 Since: DOM Level 2
 */
@@ -120,7 +120,7 @@ PHP_METHOD(domimplementation, createDocumentType)
 /* }}} end dom_domimplementation_create_document_type */
 
 
-/* {{{ proto DOMDocument dom_domimplementation_create_document(string namespaceURI, string qualifiedName, DOMDocumentType doctype);
+/* {{{ proto DOMDocument dom_domimplementation_create_document(string namespaceURI, string qualifiedName, DOMDocumentType doctype) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Level-2-Core-DOM-createDocument
 Since: DOM Level 2
 */
@@ -223,7 +223,7 @@ PHP_METHOD(domimplementation, createDocument)
 /* }}} end dom_domimplementation_create_document */
 
 
-/* {{{ proto DOMNode dom_domimplementation_get_feature(string feature, string version);
+/* {{{ proto DOMNode dom_domimplementation_get_feature(string feature, string version) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMImplementation3-getFeature
 Since: DOM Level 3
 */
index 578a56a7dd99b65d532b74c9974c73810523d081..a22dc43368373372e62b3a414b5ddbd6d7993fb0 100644 (file)
@@ -59,7 +59,7 @@ int dom_domimplementationlist_length_read(dom_object *obj, zval **retval TSRMLS_
 
 
 
-/* {{{ proto domdomimplementation dom_domimplementationlist_item(int index);
+/* {{{ proto domdomimplementation dom_domimplementationlist_item(int index) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMImplementationList-item
 Since: 
 */
index 836f1a756932310042b79946d44a88cccff208f3..15ce393764a69cb8c092dba3f2d4ab92a1c9b55a 100644 (file)
@@ -44,7 +44,7 @@ zend_function_entry php_dom_domimplementationsource_class_functions[] = {
 /* {{{ attribute protos, not implemented yet */
 
 
-/* {{{ proto domdomimplementation dom_domimplementationsource_get_domimplementation(string features);
+/* {{{ proto domdomimplementation dom_domimplementationsource_get_domimplementation(string features) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-getDOMImpl
 Since: 
 */
@@ -55,7 +55,7 @@ PHP_FUNCTION(dom_domimplementationsource_get_domimplementation)
 /* }}} end dom_domimplementationsource_get_domimplementation */
 
 
-/* {{{ proto domimplementationlist dom_domimplementationsource_get_domimplementations(string features);
+/* {{{ proto domimplementationlist dom_domimplementationsource_get_domimplementations(string features) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-getDOMImpls
 Since: 
 */
index 1a2914c344e230a72498ab8480260715412089cd..a7fba873b13e4200cde009fc4da2a6e72c37d465 100644 (file)
@@ -59,7 +59,7 @@ int dom_domstringlist_length_read(dom_object *obj, zval **retval TSRMLS_DC)
 
 
 
-/* {{{ proto domstring dom_domstringlist_item(int index);
+/* {{{ proto domstring dom_domstringlist_item(int index) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMStringList-item
 Since: 
 */
index c8cc8c29740c7caa5d84ade8e14e841cf73341dc..7a7a7c44159468ebb99d1af7c1bba7eb19695d20 100644 (file)
@@ -40,7 +40,7 @@ zend_function_entry php_dom_entityreference_class_functions[] = {
        {NULL, NULL, NULL}
 };
 
-/* {{{ proto void DOMEntityReference::__construct(string name); */
+/* {{{ proto void DOMEntityReference::__construct(string name) U */
 PHP_METHOD(domentityreference, __construct)
 {
        zval *id;
index 280b1bd61ba97a7be091e0ffde08b2fbf5d5c900..a96c636aaf26e41ea77b0c93aa23acb087c1ebba 100644 (file)
@@ -91,7 +91,7 @@ int dom_namednodemap_length_read(dom_object *obj, zval **retval TSRMLS_DC)
 
 
 
-/* {{{ proto DOMNode dom_namednodemap_get_named_item(string name);
+/* {{{ proto DOMNode dom_namednodemap_get_named_item(string name) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1074577549
 Since: 
 */
@@ -146,7 +146,7 @@ PHP_FUNCTION(dom_namednodemap_get_named_item)
 /* }}} end dom_namednodemap_get_named_item */
 
 
-/* {{{ proto DOMNode dom_namednodemap_set_named_item(DOMNode arg);
+/* {{{ proto DOMNode dom_namednodemap_set_named_item(DOMNode arg) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1025163788
 Since: 
 */
@@ -157,7 +157,7 @@ PHP_FUNCTION(dom_namednodemap_set_named_item)
 /* }}} end dom_namednodemap_set_named_item */
 
 
-/* {{{ proto DOMNode dom_namednodemap_remove_named_item(string name);
+/* {{{ proto DOMNode dom_namednodemap_remove_named_item(string name) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-D58B193
 Since: 
 */
@@ -168,7 +168,7 @@ PHP_FUNCTION(dom_namednodemap_remove_named_item)
 /* }}} end dom_namednodemap_remove_named_item */
 
 
-/* {{{ proto DOMNode dom_namednodemap_item(int index);
+/* {{{ proto DOMNode dom_namednodemap_item(int index) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-349467F9
 Since: 
 */
@@ -227,7 +227,7 @@ PHP_FUNCTION(dom_namednodemap_item)
 /* }}} end dom_namednodemap_item */
 
 
-/* {{{ proto DOMNode dom_namednodemap_get_named_item_ns(string namespaceURI, string localName);
+/* {{{ proto DOMNode dom_namednodemap_get_named_item_ns(string namespaceURI, string localName) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-getNamedItemNS
 Since: DOM Level 2
 */
@@ -282,7 +282,7 @@ PHP_FUNCTION(dom_namednodemap_get_named_item_ns)
 /* }}} end dom_namednodemap_get_named_item_ns */
 
 
-/* {{{ proto DOMNode dom_namednodemap_set_named_item_ns(DOMNode arg);
+/* {{{ proto DOMNode dom_namednodemap_set_named_item_ns(DOMNode arg) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-setNamedItemNS
 Since: DOM Level 2
 */
@@ -293,7 +293,7 @@ PHP_FUNCTION(dom_namednodemap_set_named_item_ns)
 /* }}} end dom_namednodemap_set_named_item_ns */
 
 
-/* {{{ proto DOMNode dom_namednodemap_remove_named_item_ns(string namespaceURI, string localName);
+/* {{{ proto DOMNode dom_namednodemap_remove_named_item_ns(string namespaceURI, string localName) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-removeNamedItemNS
 Since: DOM Level 2
 */
index 8a3ce6aa1c4084581db75c5c5701084fcf08677d..c3a19ffc41c1dd0672f1f73ffa353fcf1933d318 100644 (file)
@@ -58,7 +58,7 @@ int dom_namelist_length_read(dom_object *obj, zval **retval TSRMLS_DC)
 
 
 
-/* {{{ proto string dom_namelist_get_name(int index);
+/* {{{ proto string dom_namelist_get_name(int index) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#NameList-getName
 Since: 
 */
@@ -69,7 +69,7 @@ PHP_FUNCTION(dom_namelist_get_name)
 /* }}} end dom_namelist_get_name */
 
 
-/* {{{ proto string dom_namelist_get_namespace_uri(int index);
+/* {{{ proto string dom_namelist_get_namespace_uri(int index) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#NameList-getNamespaceURI
 Since: 
 */
index 1169535ecb45bf698ab1a91f75faedb90f19162d..3477bf2df8f458d292f6cc969e17fcb4ee2f72e2 100644 (file)
@@ -905,7 +905,7 @@ static xmlNodePtr _php_dom_insert_fragment(xmlNodePtr nodep, xmlNodePtr prevsib,
        return newchild;
 }
 
-/* {{{ proto domnode dom_node_insert_before(DomNode newChild, DomNode refChild);
+/* {{{ proto domnode dom_node_insert_before(DomNode newChild, DomNode refChild) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-952280727
 Since:
 */
@@ -1067,7 +1067,7 @@ PHP_FUNCTION(dom_node_insert_before)
 /* }}} end dom_node_insert_before */
 
 
-/* {{{ proto DomNode dom_node_replace_child(DomNode newChild, DomNode oldChild);
+/* {{{ proto DomNode dom_node_replace_child(DomNode newChild, DomNode oldChild) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-785887307
 Since: 
 */
@@ -1159,7 +1159,7 @@ PHP_FUNCTION(dom_node_replace_child)
 /* }}} end dom_node_replace_child */
 
 
-/* {{{ proto DomNode dom_node_remove_child(DomNode oldChild);
+/* {{{ proto DomNode dom_node_remove_child(DomNode oldChild) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1734834066
 Since: 
 */
@@ -1212,7 +1212,7 @@ PHP_FUNCTION(dom_node_remove_child)
 /* }}} end dom_node_remove_child */
 
 
-/* {{{ proto DomNode dom_node_append_child(DomNode newChild);
+/* {{{ proto DomNode dom_node_append_child(DomNode newChild) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-184E7107
 Since: 
 */
@@ -1314,7 +1314,7 @@ PHP_FUNCTION(dom_node_append_child)
 /* }}} end dom_node_append_child */
 
 
-/* {{{ proto boolean dom_node_has_child_nodes();
+/* {{{ proto boolean dom_node_has_child_nodes() U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-810594187
 Since: 
 */
@@ -1343,7 +1343,7 @@ PHP_FUNCTION(dom_node_has_child_nodes)
 /* }}} end dom_node_has_child_nodes */
 
 
-/* {{{ proto DomNode dom_node_clone_node(boolean deep);
+/* {{{ proto DomNode dom_node_clone_node(boolean deep) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-3A0ED0A4
 Since: 
 */
@@ -1407,7 +1407,7 @@ PHP_FUNCTION(dom_node_clone_node)
 
 
 
-/* {{{ proto void dom_node_normalize();
+/* {{{ proto void dom_node_normalize() U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-normalize
 Since: 
 */
@@ -1452,7 +1452,7 @@ PHP_FUNCTION(dom_node_is_supported)
 /* }}} end dom_node_is_supported */
 
 
-/* {{{ proto boolean dom_node_has_attributes();
+/* {{{ proto boolean dom_node_has_attributes() U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-NodeHasAttrs
 Since: DOM Level 2
 */
@@ -1479,7 +1479,7 @@ PHP_FUNCTION(dom_node_has_attributes)
 }
 /* }}} end dom_node_has_attributes */
 
-/* {{{ proto short dom_node_compare_document_position(DomNode other);
+/* {{{ proto short dom_node_compare_document_position(DomNode other) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-compareDocumentPosition
 Since: DOM Level 3
 */
@@ -1490,7 +1490,7 @@ PHP_FUNCTION(dom_node_compare_document_position)
 /* }}} end dom_node_compare_document_position */
 
 
-/* {{{ proto boolean dom_node_is_same_node(DomNode other);
+/* {{{ proto boolean dom_node_is_same_node(DomNode other) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-isSameNode
 Since: DOM Level 3
 */
@@ -1517,7 +1517,7 @@ PHP_FUNCTION(dom_node_is_same_node)
 /* }}} end dom_node_is_same_node */
 
 
-/* {{{ proto string dom_node_lookup_prefix(string namespaceURI);
+/* {{{ proto string dom_node_lookup_prefix(string namespaceURI) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-lookupNamespacePrefix
 Since: DOM Level 3
 */
@@ -1569,7 +1569,7 @@ PHP_FUNCTION(dom_node_lookup_prefix)
 /* }}} end dom_node_lookup_prefix */
 
 
-/* {{{ proto boolean dom_node_is_default_namespace(string namespaceURI);
+/* {{{ proto boolean dom_node_is_default_namespace(string namespaceURI) U
 URL: http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-isDefaultNamespace
 Since: DOM Level 3
 */
@@ -1600,7 +1600,7 @@ PHP_FUNCTION(dom_node_is_default_namespace)
 /* }}} end dom_node_is_default_namespace */
 
 
-/* {{{ proto string dom_node_lookup_namespace_uri(string prefix);
+/* {{{ proto string dom_node_lookup_namespace_uri(string prefix) U
 URL: http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespaceURI
 Since: DOM Level 3
 */
@@ -1630,7 +1630,7 @@ PHP_FUNCTION(dom_node_lookup_namespace_uri)
 /* }}} end dom_node_lookup_namespace_uri */
 
 
-/* {{{ proto boolean dom_node_is_equal_node(DomNode arg);
+/* {{{ proto boolean dom_node_is_equal_node(DomNode arg) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-isEqualNode
 Since: DOM Level 3
 */
@@ -1641,7 +1641,7 @@ PHP_FUNCTION(dom_node_is_equal_node)
 /* }}} end dom_node_is_equal_node */
 
 
-/* {{{ proto DomNode dom_node_get_feature(string feature, string version);
+/* {{{ proto DomNode dom_node_get_feature(string feature, string version) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-getFeature
 Since: DOM Level 3
 */
@@ -1652,7 +1652,7 @@ PHP_FUNCTION(dom_node_get_feature)
 /* }}} end dom_node_get_feature */
 
 
-/* {{{ proto DomUserData dom_node_set_user_data(string key, DomUserData data, userdatahandler handler);
+/* {{{ proto DomUserData dom_node_set_user_data(string key, DomUserData data, userdatahandler handler) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-setUserData
 Since: DOM Level 3
 */
@@ -1663,7 +1663,7 @@ PHP_FUNCTION(dom_node_set_user_data)
 /* }}} end dom_node_set_user_data */
 
 
-/* {{{ proto DomUserData dom_node_get_user_data(string key);
+/* {{{ proto DomUserData dom_node_get_user_data(string key) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-getUserData
 Since: DOM Level 3
 */
@@ -1919,14 +1919,14 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode)
        }
 }
 
-/* {{{ proto string DOMNode::C14N([bool exclusive [, bool with_comments [, array xpath [, array ns_prefixes]]]])
+/* {{{ proto string DOMNode::C14N([bool exclusive [, bool with_comments [, array xpath [, array ns_prefixes]]]]) U
    Canonicalize nodes to a string */
 PHP_METHOD(domnode, C14N)
 {
        dom_canonicalization(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
 }
 
-/* {{{ proto int DOMNode::C14NFile(string uri [, bool exclusive [, bool with_comments [, array xpath [, array ns_prefixes]]]])
+/* {{{ proto int DOMNode::C14NFile(string uri [, bool exclusive [, bool with_comments [, array xpath [, array ns_prefixes]]]]) U
    Canonicalize nodes to a file */
 PHP_METHOD(domnode, C14NFile)
 {
@@ -1935,7 +1935,7 @@ PHP_METHOD(domnode, C14NFile)
 
 #endif
 
-/* {{{ proto int DOMNode::getNodePath()
+/* {{{ proto int DOMNode::getNodePath() U
    Gets an xpath for a node */
 
 PHP_METHOD(domnode, getNodePath)
index ac663db95ba776a0f90d95f665c476553b7ee931..2a9e2a6b584d2314ea52262c89e7c52cf7d6fb34 100644 (file)
@@ -40,7 +40,7 @@ zend_function_entry php_dom_processinginstruction_class_functions[] = {
        {NULL, NULL, NULL}
 };
 
-/* {{{ proto void DOMProcessingInstruction::__construct(string name, [string value]); */
+/* {{{ proto void DOMProcessingInstruction::__construct(string name, [string value]) U */
 PHP_METHOD(domprocessinginstruction, __construct)
 {
 
index 60c4a52ff9a8fcebabf8ca5be464609bc0855d55..2dda39ad45e43d3250e76690c5f9eb2cc781ccc7 100644 (file)
@@ -44,7 +44,7 @@ zend_function_entry php_dom_string_extend_class_functions[] = {
 /* {{{ attribute protos, not implemented yet */
 
 
-/* {{{ proto int dom_string_extend_find_offset16(int offset32);
+/* {{{ proto int dom_string_extend_find_offset16(int offset32) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#i18n-methods-StringExtend-findOffset16
 Since: 
 */
@@ -55,7 +55,7 @@ PHP_FUNCTION(dom_string_extend_find_offset16)
 /* }}} end dom_string_extend_find_offset16 */
 
 
-/* {{{ proto int dom_string_extend_find_offset32(int offset16);
+/* {{{ proto int dom_string_extend_find_offset32(int offset16) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#i18n-methods-StringExtend-findOffset32
 Since: 
 */
index 9097a887e9f135d809497d9539329cddc95e79d0..10a553843199c65af301cfbb2030322e110ca52a 100644 (file)
@@ -14,9 +14,10 @@ if(!$dom) {
 }
 
 $node = $dom->documentElement;
-
-$lang = $node->getAttributeNode('language');
-echo "Language: ".$lang->value."\n";
+if ($node->hasAttributes()) {
+       $lang = $node->getAttributeNode('language');
+       echo "Language: ".$lang->value."\n";
+}
 
 $lang->value = 'en-US';
 echo "Language: ".$lang->value."\n";
@@ -32,7 +33,18 @@ $top_element = $node->cloneNode();
 
 print $dom->saveXML($top_element);
 
+$dom->loadXML(b'<root xmlns:a="urn::atest" a:att1="1" a:att2="2" />');
+$root = $dom->documentElement;
+$nmap = $root->attributes;
 
+print "\n\n";
+
+if ($attr = $nmap->getNamedItemNS(NULL, 'att1')) {
+       print $attr->nodeValue."\n";
+}
+if ($attr = $nmap->getNamedItemNS("urn::atest", 'att1')) {
+       print $attr->nodeValue."\n";
+}
 ?>
 --EXPECT--
 
@@ -41,3 +53,4 @@ Language: en-US
 Is ID?: NO
 <chapter language="en-US" num="1"/>
 
+1
index bc69af602c311a95667e97654f1f3345a333617e..bae0baa96455b13e57358d8889627bdb508b9560 100644 (file)
@@ -14,7 +14,11 @@ if(!$dom) {
 }
 
 $node = $dom->documentElement;
-echo "Tag Name: ".$node->tagName."\n";
+$node2 = $node->firstChild->parentNode;
+
+if ($node2->isSameNode($node)) {
+       echo "Tag Name: ".$node->tagName."\n";
+}
 
 
 $node->setAttribute('num', '1');
diff --git a/ext/dom/tests/domfragment.phpt b/ext/dom/tests/domfragment.phpt
new file mode 100644 (file)
index 0000000..391cb6b
--- /dev/null
@@ -0,0 +1,36 @@
+--TEST--
+DOMDocumentFragment Tests
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+require_once("dom_test.inc");
+
+$dom = new DOMDocument;
+$dom->loadXML(b'<root/>');
+if(!$dom) {
+  echo "Error while parsing the document\n";
+  exit;
+}
+
+$node = $dom->documentElement;
+
+try {
+       $frag1 = new DOMDocumentFragment();
+       $frag1->appendXML('<fragnode>1</fragnode>');
+       $node->appendXML($frag1);
+} catch (DOMException $e) {
+       print "Read Only!\n\n";
+}
+
+$frag2 = $dom->createDocumentFragment();
+$frag2->appendXML('<fragnode2>2</fragnode2>');
+$node->appendChild($frag2);
+
+print $dom->saveXML();
+?>
+--EXPECT--
+Read Only!
+
+<?xml version="1.0"?>
+<root><fragnode2>2</fragnode2></root>
diff --git a/ext/dom/tests/domimplementation.phpt b/ext/dom/tests/domimplementation.phpt
new file mode 100644 (file)
index 0000000..3ec69d6
--- /dev/null
@@ -0,0 +1,27 @@
+--TEST--
+DOMImplementation Tests
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+require_once("dom_test.inc");
+
+$domimp = new DOMImplementation();
+var_dump($domimp->hasFeature("1.0", "Core"));
+
+$doctype = $domimp->createDocumentType("HTML", "-//W3C//DTD HTML 4.01//EN", "http://www.w3.org/TR/html4/strict.dtd");
+
+$dom = $domimp->createDocument(NULL, "HTML", $doctype);
+
+$html = $dom->documentElement;
+
+$html->appendChild(new DOMElement("body", "hello world"));
+$html->firstChild->appendChild(new DOMEntityReference("preformatted"));
+
+print $dom->saveXML();
+?>
+--EXPECT--
+bool(false)
+<?xml version="1.0"?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML><body>hello world&preformatted;</body></HTML>
diff --git a/ext/dom/tests/dompi.phpt b/ext/dom/tests/dompi.phpt
new file mode 100644 (file)
index 0000000..db26e34
--- /dev/null
@@ -0,0 +1,26 @@
+--TEST--
+DOMProcessingInstruction Tests
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+require_once("dom_test.inc");
+
+$dom = new DOMDocument;
+$dom->loadXML(b'<root />');
+
+$pi = new DOMProcessingInstruction("mypi", "my instructions");
+
+$dom->documentElement->appendChild($pi);
+
+print $pi->target."\n";
+print $pi->data."\n";
+$pi->data = "my new instructions";
+
+print $dom->saveXML();
+?>
+--EXPECT--
+mypi
+my instructions
+<?xml version="1.0"?>
+<root><?mypi my new instructions?></root>
index 28f58ac85be2ed785a59500c2ccc3b78090fc78b..a47fad0212e3e2e2cf27cd059835328565350a2f 100644 (file)
@@ -191,7 +191,7 @@ PHP_FUNCTION(dom_text_is_whitespace_in_element_content)
 /* }}} end dom_text_is_whitespace_in_element_content */
 
 
-/* {{{ proto DOMText dom_text_replace_whole_text(string content)
+/* {{{ proto DOMText dom_text_replace_whole_text(string content) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Text3-replaceWholeText
 Since: DOM Level 3
 */
index 245cf66333ef5d21aa14d723cd3c5ca3e599fc39..1e91b54e67260eca909dcc77b12f69e06e28efe2 100644 (file)
@@ -43,7 +43,7 @@ zend_function_entry php_dom_userdatahandler_class_functions[] = {
 /* {{{ attribute protos, not implemented yet */
 
 
-/* {{{ proto dom_void dom_userdatahandler_handle(short operation, string key, domobject data, node src, node dst);
+/* {{{ proto dom_void dom_userdatahandler_handle(short operation, string key, domobject data, node src, node dst) U
 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-handleUserDataEvent
 Since: 
 */
index d0885d1eb0cb82b76916cfd01423c74851a94a2a..ebfde0d5e8ebc53df6218e0de94d3f2978c3f5df 100644 (file)
@@ -44,7 +44,7 @@ zend_function_entry php_dom_xpath_class_functions[] = {
        {NULL, NULL, NULL}
 };
 
-/* {{{ proto void DOMXPath::__construct(DOMDocument doc); */
+/* {{{ proto void DOMXPath::__construct(DOMDocument doc) U */
 PHP_METHOD(domxpath, __construct)
 {
        zval *id, *doc;
@@ -280,14 +280,14 @@ static void php_xpath_eval(INTERNAL_FUNCTION_PARAMETERS, int type) {
        xmlXPathFreeObject(xpathobjp);
 }
 
-/* {{{ proto DOMNodeList dom_xpath_query(string expr [,DOMNode context]); */
+/* {{{ proto DOMNodeList dom_xpath_query(string expr [,DOMNode context]) U */
 PHP_FUNCTION(dom_xpath_query)
 {
        php_xpath_eval(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_DOM_XPATH_QUERY);
 }
 /* }}} end dom_xpath_query */
 
-/* {{{ proto mixed dom_xpath_evaluate(string expr [,DOMNode context]); */
+/* {{{ proto mixed dom_xpath_evaluate(string expr [,DOMNode context]) U */
 PHP_FUNCTION(dom_xpath_evaluate)
 {
        php_xpath_eval(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_DOM_XPATH_EVALUATE);