diff options
Diffstat (limited to 'ext/dom/document.c')
-rw-r--r-- | ext/dom/document.c | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/ext/dom/document.c b/ext/dom/document.c index 9f6c093f76..d198e95a9d 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -187,10 +187,10 @@ ZEND_END_ARG_INFO(); /* }}} */ /* -* class DOMDocument extends DOMNode +* class DOMDocument extends DOMNode * * URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-i-Document -* Since: +* Since: */ const zend_function_entry php_dom_document_class_functions[] = { /* {{{ */ @@ -235,10 +235,10 @@ const zend_function_entry php_dom_document_class_functions[] = { /* {{{ */ }; /* }}} */ -/* {{{ docType DOMDocumentType -readonly=yes +/* {{{ docType DOMDocumentType +readonly=yes URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-B63ED1A31 -Since: +Since: */ int dom_document_doctype_read(dom_object *obj, zval *retval) { @@ -262,10 +262,10 @@ int dom_document_doctype_read(dom_object *obj, zval *retval) /* }}} */ -/* {{{ implementation DOMImplementation -readonly=yes +/* {{{ implementation DOMImplementation +readonly=yes URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1B793EBA -Since: +Since: */ int dom_document_implementation_read(dom_object *obj, zval *retval) { @@ -275,10 +275,10 @@ int dom_document_implementation_read(dom_object *obj, zval *retval) /* }}} */ -/* {{{ documentElement DOMElement -readonly=yes +/* {{{ documentElement DOMElement +readonly=yes URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-87CD092 -Since: +Since: */ int dom_document_document_element_read(dom_object *obj, zval *retval) { @@ -358,8 +358,8 @@ int dom_document_encoding_write(dom_object *obj, zval *newval) /* }}} */ -/* {{{ standalone boolean -readonly=no +/* {{{ standalone boolean +readonly=no URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-standalone Since: DOM Level 3 */ @@ -396,7 +396,7 @@ int dom_document_standalone_write(dom_object *obj, zval *newval) /* }}} */ -/* {{{ version string +/* {{{ version string readonly=no URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-version Since: DOM Level 3 @@ -446,8 +446,8 @@ int dom_document_version_write(dom_object *obj, zval *newval) /* }}} */ -/* {{{ strictErrorChecking boolean -readonly=no +/* {{{ strictErrorChecking boolean +readonly=no URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-strictErrorChecking Since: DOM Level 3 */ @@ -475,7 +475,7 @@ int dom_document_strict_error_checking_write(dom_object *obj, zval *newval) /* }}} */ -/* {{{ formatOutput boolean +/* {{{ formatOutput boolean readonly=no */ int dom_document_format_output_read(dom_object *obj, zval *retval) @@ -500,7 +500,7 @@ int dom_document_format_output_write(dom_object *obj, zval *newval) } /* }}} */ -/* {{{ validateOnParse boolean +/* {{{ validateOnParse boolean readonly=no */ int dom_document_validate_on_parse_read(dom_object *obj, zval *retval) @@ -525,7 +525,7 @@ int dom_document_validate_on_parse_write(dom_object *obj, zval *newval) } /* }}} */ -/* {{{ resolveExternals boolean +/* {{{ resolveExternals boolean readonly=no */ int dom_document_resolve_externals_read(dom_object *obj, zval *retval) @@ -550,7 +550,7 @@ int dom_document_resolve_externals_write(dom_object *obj, zval *newval) } /* }}} */ -/* {{{ preserveWhiteSpace boolean +/* {{{ preserveWhiteSpace boolean readonly=no */ int dom_document_preserve_whitespace_read(dom_object *obj, zval *retval) @@ -575,7 +575,7 @@ int dom_document_preserve_whitespace_write(dom_object *obj, zval *newval) } /* }}} */ -/* {{{ recover boolean +/* {{{ recover boolean readonly=no */ int dom_document_recover_read(dom_object *obj, zval *retval) @@ -600,7 +600,7 @@ int dom_document_recover_write(dom_object *obj, zval *newval) } /* }}} */ -/* {{{ substituteEntities boolean +/* {{{ substituteEntities boolean readonly=no */ int dom_document_substitue_entities_read(dom_object *obj, zval *retval) @@ -625,8 +625,8 @@ int dom_document_substitue_entities_write(dom_object *obj, zval *newval) } /* }}} */ -/* {{{ documentURI string -readonly=no +/* {{{ documentURI string +readonly=no URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-documentURI Since: DOM Level 3 */ @@ -674,8 +674,8 @@ int dom_document_document_uri_write(dom_object *obj, zval *newval) /* }}} */ -/* {{{ config DOMConfiguration -readonly=yes +/* {{{ config DOMConfiguration +readonly=yes URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-config Since: DOM Level 3 */ @@ -689,7 +689,7 @@ int dom_document_config_read(dom_object *obj, zval *retval) /* {{{ proto DOMElement dom_document_create_element(string tagName [, string value]); URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-2141741547 -Since: +Since: */ PHP_FUNCTION(dom_document_create_element) { @@ -723,7 +723,7 @@ PHP_FUNCTION(dom_document_create_element) /* {{{ proto DOMDocumentFragment dom_document_create_document_fragment(); URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-35CB04B5 -Since: +Since: */ PHP_FUNCTION(dom_document_create_document_fragment) { @@ -750,7 +750,7 @@ PHP_FUNCTION(dom_document_create_document_fragment) /* {{{ proto DOMText dom_document_create_text_node(string data); URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1975348127 -Since: +Since: */ PHP_FUNCTION(dom_document_create_text_node) { @@ -779,7 +779,7 @@ PHP_FUNCTION(dom_document_create_text_node) /* {{{ proto DOMComment dom_document_create_comment(string data); URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1334481328 -Since: +Since: */ PHP_FUNCTION(dom_document_create_comment) { @@ -808,7 +808,7 @@ PHP_FUNCTION(dom_document_create_comment) /* {{{ proto DOMCdataSection dom_document_create_cdatasection(string data); URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-D26C0AF8 -Since: +Since: */ PHP_FUNCTION(dom_document_create_cdatasection) { @@ -837,7 +837,7 @@ PHP_FUNCTION(dom_document_create_cdatasection) /* {{{ proto DOMProcessingInstruction dom_document_create_processing_instruction(string target, string data); URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-135944439 -Since: +Since: */ PHP_FUNCTION(dom_document_create_processing_instruction) { @@ -873,7 +873,7 @@ PHP_FUNCTION(dom_document_create_processing_instruction) /* {{{ proto DOMAttr dom_document_create_attribute(string name); URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1084891198 -Since: +Since: */ PHP_FUNCTION(dom_document_create_attribute) { @@ -908,7 +908,7 @@ PHP_FUNCTION(dom_document_create_attribute) /* {{{ proto DOMEntityReference dom_document_create_entity_reference(string name); URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-392B75AE -Since: +Since: */ PHP_FUNCTION(dom_document_create_entity_reference) { @@ -942,7 +942,7 @@ PHP_FUNCTION(dom_document_create_entity_reference) /* {{{ proto DOMNodeList dom_document_get_elements_by_tag_name(string tagname); URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-A6C9094 -Since: +Since: */ PHP_FUNCTION(dom_document_get_elements_by_tag_name) { @@ -976,7 +976,7 @@ PHP_FUNCTION(dom_document_import_node) xmlDocPtr docp; xmlNodePtr nodep, retnodep; dom_object *intern, *nodeobj; - int ret; + int ret; zend_long recursive = 0; if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "OO|l", &id, dom_document_class_entry, &node, dom_node_class_entry, &recursive) == FAILURE) { @@ -987,7 +987,7 @@ PHP_FUNCTION(dom_document_import_node) DOM_GET_OBJ(nodep, node, xmlNodePtr, nodeobj); - if (nodep->type == XML_HTML_DOCUMENT_NODE || nodep->type == XML_DOCUMENT_NODE + if (nodep->type == XML_HTML_DOCUMENT_NODE || nodep->type == XML_DOCUMENT_NODE || nodep->type == XML_DOCUMENT_TYPE_NODE) { php_error_docref(NULL, E_WARNING, "Cannot import: Node Type Not Supported"); RETURN_FALSE; @@ -1078,7 +1078,7 @@ PHP_FUNCTION(dom_document_create_element_ns) RETURN_FALSE; } - + nodep->ns = nsptr; DOM_RET_OBJ(nodep, &ret, intern); @@ -1387,7 +1387,7 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, size_t so if (file_dest) { ctxt = xmlCreateFileParserCtxt(file_dest); } - + } else { ctxt = xmlCreateMemoryParserCtxt(source, source_len); } @@ -1711,7 +1711,7 @@ PHP_FUNCTION(dom_document_xinclude) zval *id; xmlDoc *docp; xmlNodePtr root; - zend_long flags = 0; + zend_long flags = 0; int err; dom_object *intern; @@ -1724,7 +1724,7 @@ PHP_FUNCTION(dom_document_xinclude) err = xmlXIncludeProcessFlags(docp, flags); /* 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 + are added via xmlXIncludeProcess to mark beginning and ending of xincluded document but are not wanted in resulting document - must be done even if err as it could fail after having processed some xincludes */ root = (xmlNodePtr) docp->children; @@ -1740,7 +1740,7 @@ PHP_FUNCTION(dom_document_xinclude) } else { RETVAL_FALSE; } - + } /* }}} */ @@ -1761,19 +1761,19 @@ PHP_FUNCTION(dom_document_validate) DOM_GET_OBJ(docp, id, xmlDocPtr, intern); cvp = xmlNewValidCtxt(); - + cvp->userData = NULL; cvp->error = (xmlValidityErrorFunc) php_libxml_error_handler; cvp->warning = (xmlValidityErrorFunc) php_libxml_error_handler; - + if (xmlValidateDocument(cvp, docp)) { RETVAL_TRUE; } else { RETVAL_FALSE; } - + xmlFreeValidCtxt(cvp); - + } /* }}} */ @@ -1815,7 +1815,7 @@ static void _dom_document_schema_validate(INTERNAL_FUNCTION_PARAMETERS, int type break; case DOM_LOAD_STRING: parser = xmlSchemaNewMemParserCtxt(source, source_len); - /* If loading from memory, we need to set the base directory for the document + /* If loading from memory, we need to set the base directory for the document but it is not apparent how to do that for schema's */ break; default: @@ -1911,7 +1911,7 @@ static void _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAMETERS, int typ break; case DOM_LOAD_STRING: parser = xmlRelaxNGNewMemParserCtxt(source, source_len); - /* If loading from memory, we need to set the base directory for the document + /* If loading from memory, we need to set the base directory for the document but it is not apparent how to do that for schema's */ break; default: @@ -1980,7 +1980,7 @@ static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */ int refcount, ret; zend_long options = 0; htmlParserCtxtPtr ctxt; - + id = getThis(); if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &source, &source_len, &options) == FAILURE) { @@ -2016,7 +2016,7 @@ static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */ htmlParseDocument(ctxt); newdoc = ctxt->myDoc; htmlFreeParserCtxt(ctxt); - + if (!newdoc) RETURN_FALSE; @@ -2139,13 +2139,13 @@ PHP_FUNCTION(dom_document_save_html) php_dom_throw_error(WRONG_DOCUMENT_ERR, dom_get_strict_error(intern->document)); RETURN_FALSE; } - + buf = xmlBufferCreate(); if (!buf) { php_error_docref(NULL, E_WARNING, "Could not fetch buffer"); RETURN_FALSE; } - + if (node->type == XML_DOCUMENT_FRAG_NODE) { int one_size; |