summaryrefslogtreecommitdiff
path: root/ext/dom
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dom')
-rw-r--r--ext/dom/attr.c2
-rw-r--r--ext/dom/cdatasection.c2
-rw-r--r--ext/dom/characterdata.c2
-rw-r--r--ext/dom/comment.c2
-rw-r--r--ext/dom/config.m42
-rw-r--r--ext/dom/config.w322
-rw-r--r--ext/dom/document.c2
-rw-r--r--ext/dom/documentfragment.c2
-rw-r--r--ext/dom/documenttype.c6
-rw-r--r--ext/dom/dom_ce.h2
-rw-r--r--ext/dom/dom_fe.h2
-rw-r--r--ext/dom/dom_iterators.c2
-rw-r--r--ext/dom/dom_properties.h2
-rw-r--r--ext/dom/domconfiguration.c2
-rw-r--r--ext/dom/domerror.c2
-rw-r--r--ext/dom/domerrorhandler.c2
-rw-r--r--ext/dom/domexception.c2
-rw-r--r--ext/dom/domimplementation.c2
-rw-r--r--ext/dom/domimplementationlist.c2
-rw-r--r--ext/dom/domimplementationsource.c2
-rw-r--r--ext/dom/domlocator.c2
-rw-r--r--ext/dom/domstringlist.c2
-rw-r--r--ext/dom/element.c2
-rw-r--r--ext/dom/entity.c2
-rw-r--r--ext/dom/entityreference.c2
-rw-r--r--ext/dom/namednodemap.c2
-rw-r--r--ext/dom/namelist.c2
-rw-r--r--ext/dom/node.c2
-rw-r--r--ext/dom/nodelist.c2
-rw-r--r--ext/dom/notation.c2
-rw-r--r--ext/dom/php_dom.c2
-rw-r--r--ext/dom/php_dom.h2
-rw-r--r--ext/dom/processinginstruction.c2
-rw-r--r--ext/dom/string_extend.c2
-rwxr-xr-xext/dom/tests/DOMAttr_value_basic_001.phpt11
-rw-r--r--ext/dom/tests/DOMCharacterData_data_basic_002.phpt28
-rwxr-xr-xext/dom/tests/DOMCharacterData_length_error_001.phpt12
-rw-r--r--ext/dom/tests/DOMCharacterData_substringData_basic_001.phpt21
-rw-r--r--ext/dom/tests/DOMDocument_config_basic.phpt26
-rw-r--r--ext/dom/tests/DOMDocument_createEntityReference_basic.phpt19
-rw-r--r--ext/dom/tests/DOMDocument_documentURI_basic.phpt39
-rw-r--r--ext/dom/tests/DOMDocument_encoding_basic.phpt52
-rw-r--r--ext/dom/tests/DOMDocument_implementationRead_basic.phpt21
-rw-r--r--ext/dom/tests/DOMDocument_preserveWhiteSpace_basic.phpt23
-rw-r--r--ext/dom/tests/DOMDocument_preserveWhiteSpace_variations.phpt40
-rw-r--r--ext/dom/tests/DOMDocument_resolveExternals_basic.phpt49
-rw-r--r--ext/dom/tests/DOMDocument_saveHTMLFile_basic.phpt29
-rw-r--r--ext/dom/tests/DOMDocument_saveHTMLFile_error1.phpt24
-rw-r--r--ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt15
-rw-r--r--ext/dom/tests/DOMDocument_saveHTMLFile_formatOutput.phpt33
-rw-r--r--ext/dom/tests/DOMDocument_saveHTMLFile_invalid_filename.phpt25
-rw-r--r--ext/dom/tests/DOMDocument_saveHTML_basic.phpt24
-rw-r--r--ext/dom/tests/DOMDocument_saveHTML_error1.phpt24
-rw-r--r--ext/dom/tests/DOMDocument_saveHTML_error2.phpt15
-rwxr-xr-xext/dom/tests/DOMDocument_schemaValidateSource_basic.phpt22
-rwxr-xr-xext/dom/tests/DOMDocument_schemaValidateSource_error1.phpt29
-rwxr-xr-xext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt23
-rwxr-xr-xext/dom/tests/DOMDocument_schemaValidateSource_error3.phpt21
-rwxr-xr-xext/dom/tests/DOMDocument_schemaValidateSource_error4.phpt21
-rwxr-xr-xext/dom/tests/DOMDocument_schemaValidate_basic.phpt20
-rwxr-xr-xext/dom/tests/DOMDocument_schemaValidate_error1.phpt29
-rwxr-xr-xext/dom/tests/DOMDocument_schemaValidate_error2.phpt21
-rwxr-xr-xext/dom/tests/DOMDocument_schemaValidate_error3.phpt21
-rwxr-xr-xext/dom/tests/DOMDocument_schemaValidate_error4.phpt21
-rwxr-xr-xext/dom/tests/DOMDocument_schemaValidate_error5.phpt25
-rw-r--r--ext/dom/tests/DOMDocument_standalone_basic.phpt48
-rw-r--r--ext/dom/tests/DOMDocument_strictErrorChecking_basic.phpt22
-rw-r--r--ext/dom/tests/DOMDocument_strictErrorChecking_variation.phpt59
-rw-r--r--ext/dom/tests/DOMDocument_validate_basic.phpt31
-rw-r--r--ext/dom/tests/DOMDocument_validate_error1.phpt16
-rw-r--r--ext/dom/tests/DOMDocument_validate_error2.phpt15
-rw-r--r--ext/dom/tests/DOMDocument_validate_external_dtd.phpt19
-rw-r--r--ext/dom/tests/DOMDocument_validate_on_parse_basic.phpt38
-rw-r--r--ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt49
-rwxr-xr-xext/dom/tests/book-non-conforming-schema.xsd17
-rwxr-xr-xext/dom/tests/book-not-a-schema.xsd1
-rwxr-xr-xext/dom/tests/book.xsd17
-rw-r--r--ext/dom/tests/domdocument_createcomment_error_001.phpt11
-rw-r--r--ext/dom/tests/domdocument_createentityreference_001.phpt13
-rw-r--r--ext/dom/tests/domdocument_createentityreference_002.phpt12
-rw-r--r--ext/dom/text.c2
-rw-r--r--ext/dom/typeinfo.c2
-rw-r--r--ext/dom/userdatahandler.c2
-rw-r--r--ext/dom/xml_common.h2
-rw-r--r--ext/dom/xpath.c2
85 files changed, 1191 insertions, 42 deletions
diff --git a/ext/dom/attr.c b/ext/dom/attr.c
index a3133ff7b..f6f57afb0 100644
--- a/ext/dom/attr.c
+++ b/ext/dom/attr.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: attr.c,v 1.18.2.2.2.2.2.12 2009/03/13 13:43:29 rrichards Exp $ */
+/* $Id: attr.c 277102 2009-03-13 13:43:29Z rrichards $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/cdatasection.c b/ext/dom/cdatasection.c
index ae98fa9d8..f57e3c4f0 100644
--- a/ext/dom/cdatasection.c
+++ b/ext/dom/cdatasection.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: cdatasection.c,v 1.11.2.1.2.1.2.11 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: cdatasection.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/characterdata.c b/ext/dom/characterdata.c
index c0b660ff1..9af73a187 100644
--- a/ext/dom/characterdata.c
+++ b/ext/dom/characterdata.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: characterdata.c,v 1.15.2.1.2.2.2.9 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: characterdata.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/comment.c b/ext/dom/comment.c
index 79127245b..c3888a8bc 100644
--- a/ext/dom/comment.c
+++ b/ext/dom/comment.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: comment.c,v 1.11.2.1.2.1.2.11 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: comment.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/config.m4 b/ext/dom/config.m4
index 12d40f28c..89dd4c037 100644
--- a/ext/dom/config.m4
+++ b/ext/dom/config.m4
@@ -1,5 +1,5 @@
dnl
-dnl $Id: config.m4,v 1.20.4.1 2007/07/03 17:25:33 sniper Exp $
+dnl $Id: config.m4 239118 2007-07-03 17:25:43Z sniper $
dnl
PHP_ARG_ENABLE(dom, whether to enable DOM support,
diff --git a/ext/dom/config.w32 b/ext/dom/config.w32
index bec3b81d3..e8237853f 100644
--- a/ext/dom/config.w32
+++ b/ext/dom/config.w32
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.3.8.1 2008/06/23 18:40:28 pajoye Exp $
+// $Id: config.w32 261548 2008-06-23 18:40:29Z pajoye $
// vim:ft=javascript
ARG_WITH("dom", "DOM support", "yes");
diff --git a/ext/dom/document.c b/ext/dom/document.c
index ea3d1a825..9fc6290d1 100644
--- a/ext/dom/document.c
+++ b/ext/dom/document.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: document.c,v 1.68.2.3.2.5.2.17 2009/06/14 13:13:35 iliaa Exp $ */
+/* $Id: document.c 282119 2009-06-14 13:13:35Z iliaa $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/documentfragment.c b/ext/dom/documentfragment.c
index 4bd53104d..c1b3b6490 100644
--- a/ext/dom/documentfragment.c
+++ b/ext/dom/documentfragment.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: documentfragment.c,v 1.15.2.1.2.1.2.11 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: documentfragment.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/documenttype.c b/ext/dom/documenttype.c
index 20cfdea6e..fcb938f97 100644
--- a/ext/dom/documenttype.c
+++ b/ext/dom/documenttype.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: documenttype.c,v 1.15.2.1.2.1.2.4 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: documenttype.c 289439 2009-10-09 18:52:59Z pajoye $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -190,7 +190,6 @@ int dom_documenttype_internal_subset_read(dom_object *obj, zval **retval TSRMLS_
xmlDtdPtr dtdptr;
xmlDtd *intsubset;
xmlOutputBuffer *buff = NULL;
- xmlChar *strintsubset;
dtdptr = (xmlDtdPtr) dom_object_get_node(obj);
@@ -206,9 +205,8 @@ int dom_documenttype_internal_subset_read(dom_object *obj, zval **retval TSRMLS_
if (buff != NULL) {
xmlNodeDumpOutput (buff, NULL, (xmlNodePtr) intsubset, 0, 0, NULL);
xmlOutputBufferFlush(buff);
- strintsubset = xmlStrndup(buff->buffer->content, buff->buffer->use);
+ ZVAL_STRINGL(*retval, buff->buffer->content, buff->buffer->use, 1);
(void)xmlOutputBufferClose(buff);
- ZVAL_STRING(*retval, (char *) strintsubset, 1);
return SUCCESS;
}
}
diff --git a/ext/dom/dom_ce.h b/ext/dom/dom_ce.h
index 13a408d55..d14b3103e 100644
--- a/ext/dom/dom_ce.h
+++ b/ext/dom/dom_ce.h
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dom_ce.h,v 1.8.2.1.2.1.2.3 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: dom_ce.h 272370 2008-12-31 11:15:49Z sebastian $ */
#ifndef DOM_CE_H
#define DOM_CE_H
diff --git a/ext/dom/dom_fe.h b/ext/dom/dom_fe.h
index 1c53d3297..3a052f2ee 100644
--- a/ext/dom/dom_fe.h
+++ b/ext/dom/dom_fe.h
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dom_fe.h,v 1.14.2.1.2.4.2.6 2009/01/13 18:06:48 rrichards Exp $ */
+/* $Id: dom_fe.h 273468 2009-01-13 18:06:48Z rrichards $ */
#ifndef DOM_FE_H
#define DOM_FE_H
diff --git a/ext/dom/dom_iterators.c b/ext/dom/dom_iterators.c
index 1527a7303..e76b4ac79 100644
--- a/ext/dom/dom_iterators.c
+++ b/ext/dom/dom_iterators.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dom_iterators.c,v 1.9.2.3.2.5.2.4 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: dom_iterators.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/dom_properties.h b/ext/dom/dom_properties.h
index b4232fd7f..6fd1bcc3b 100644
--- a/ext/dom/dom_properties.h
+++ b/ext/dom/dom_properties.h
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dom_properties.h,v 1.7.2.1.2.1.2.3 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: dom_properties.h 272370 2008-12-31 11:15:49Z sebastian $ */
#ifndef DOM_PROPERTIES_H
#define DOM_PROPERTIES_H
diff --git a/ext/dom/domconfiguration.c b/ext/dom/domconfiguration.c
index 5e75ea944..5ae0421ac 100644
--- a/ext/dom/domconfiguration.c
+++ b/ext/dom/domconfiguration.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: domconfiguration.c,v 1.5.2.1.2.1.2.9 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: domconfiguration.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/domerror.c b/ext/dom/domerror.c
index d5e7e7813..330d4af75 100644
--- a/ext/dom/domerror.c
+++ b/ext/dom/domerror.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: domerror.c,v 1.6.2.1.2.1.2.4 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: domerror.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/domerrorhandler.c b/ext/dom/domerrorhandler.c
index 3696b66b8..a161428e7 100644
--- a/ext/dom/domerrorhandler.c
+++ b/ext/dom/domerrorhandler.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: domerrorhandler.c,v 1.5.2.1.2.1.2.8 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: domerrorhandler.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/domexception.c b/ext/dom/domexception.c
index cf94be365..9301c11fa 100644
--- a/ext/dom/domexception.c
+++ b/ext/dom/domexception.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: domexception.c,v 1.11.2.1.2.1.2.4 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: domexception.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/domimplementation.c b/ext/dom/domimplementation.c
index 772218c40..6ec0e6534 100644
--- a/ext/dom/domimplementation.c
+++ b/ext/dom/domimplementation.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: domimplementation.c,v 1.15.2.2.2.2.2.9 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: domimplementation.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/domimplementationlist.c b/ext/dom/domimplementationlist.c
index 99c5c1cee..144e58af8 100644
--- a/ext/dom/domimplementationlist.c
+++ b/ext/dom/domimplementationlist.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: domimplementationlist.c,v 1.6.2.1.2.1.2.8 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: domimplementationlist.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/domimplementationsource.c b/ext/dom/domimplementationsource.c
index e376738d2..66248e3ca 100644
--- a/ext/dom/domimplementationsource.c
+++ b/ext/dom/domimplementationsource.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: domimplementationsource.c,v 1.5.2.1.2.1.2.8 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: domimplementationsource.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/domlocator.c b/ext/dom/domlocator.c
index 6c8baeb67..f40d47d2c 100644
--- a/ext/dom/domlocator.c
+++ b/ext/dom/domlocator.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: domlocator.c,v 1.6.2.1.2.1.2.4 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: domlocator.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/domstringlist.c b/ext/dom/domstringlist.c
index c6d4ff4cb..d2d787944 100644
--- a/ext/dom/domstringlist.c
+++ b/ext/dom/domstringlist.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: domstringlist.c,v 1.6.2.1.2.1.2.8 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: domstringlist.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/element.c b/ext/dom/element.c
index b2b7b7d32..69d780fa0 100644
--- a/ext/dom/element.c
+++ b/ext/dom/element.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: element.c,v 1.36.2.4.2.8.2.12 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: element.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/entity.c b/ext/dom/entity.c
index 1e53ebdcb..7caaab00f 100644
--- a/ext/dom/entity.c
+++ b/ext/dom/entity.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: entity.c,v 1.9.2.1.2.1.2.4 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: entity.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/entityreference.c b/ext/dom/entityreference.c
index 6d8d7f560..762fc3fd5 100644
--- a/ext/dom/entityreference.c
+++ b/ext/dom/entityreference.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: entityreference.c,v 1.12.2.1.2.2.2.10 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: entityreference.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/namednodemap.c b/ext/dom/namednodemap.c
index 50c8f027f..2ea88f6ca 100644
--- a/ext/dom/namednodemap.c
+++ b/ext/dom/namednodemap.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: namednodemap.c,v 1.15.2.2.2.1.2.8 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: namednodemap.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/namelist.c b/ext/dom/namelist.c
index 164e04963..116165e16 100644
--- a/ext/dom/namelist.c
+++ b/ext/dom/namelist.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: namelist.c,v 1.7.2.1.2.1.2.8 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: namelist.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/node.c b/ext/dom/node.c
index 82366c63c..923757d93 100644
--- a/ext/dom/node.c
+++ b/ext/dom/node.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: node.c,v 1.37.2.3.2.8.2.14 2009/03/13 13:43:29 rrichards Exp $ */
+/* $Id: node.c 277102 2009-03-13 13:43:29Z rrichards $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/nodelist.c b/ext/dom/nodelist.c
index 84ca08dc4..923db9680 100644
--- a/ext/dom/nodelist.c
+++ b/ext/dom/nodelist.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: nodelist.c,v 1.17.2.2.2.2.2.8 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: nodelist.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/notation.c b/ext/dom/notation.c
index 84e5bdf42..48171775b 100644
--- a/ext/dom/notation.c
+++ b/ext/dom/notation.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: notation.c,v 1.9.2.2.2.1.2.4 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: notation.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c
index feaf3afeb..214139c5f 100644
--- a/ext/dom/php_dom.c
+++ b/ext/dom/php_dom.c
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_dom.c,v 1.73.2.12.2.12.2.14 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: php_dom.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/php_dom.h b/ext/dom/php_dom.h
index 4d2e4b6f1..1e43aa0fd 100644
--- a/ext/dom/php_dom.h
+++ b/ext/dom/php_dom.h
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_dom.h,v 1.28.2.1.2.4.2.5 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: php_dom.h 272370 2008-12-31 11:15:49Z sebastian $ */
#ifndef PHP_DOM_H
#define PHP_DOM_H
diff --git a/ext/dom/processinginstruction.c b/ext/dom/processinginstruction.c
index 850001485..8e6d676cf 100644
--- a/ext/dom/processinginstruction.c
+++ b/ext/dom/processinginstruction.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: processinginstruction.c,v 1.17.2.1.2.1.2.12 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: processinginstruction.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/string_extend.c b/ext/dom/string_extend.c
index cf7a48f7a..8b791dfbf 100644
--- a/ext/dom/string_extend.c
+++ b/ext/dom/string_extend.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: string_extend.c,v 1.5.2.1.2.1.2.8 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: string_extend.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/tests/DOMAttr_value_basic_001.phpt b/ext/dom/tests/DOMAttr_value_basic_001.phpt
new file mode 100755
index 000000000..2a2b52121
--- /dev/null
+++ b/ext/dom/tests/DOMAttr_value_basic_001.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Read empty $value.
+--CREDIT--
+Jason Bouffard <jbouffard1@yahoo.com>
+# TestFest Atlanta 2009-05-14
+--FILE--
+<?php
+$attr = new DOMAttr('category');
+print $attr->value."\n";
+?>
+--EXPECTF--
diff --git a/ext/dom/tests/DOMCharacterData_data_basic_002.phpt b/ext/dom/tests/DOMCharacterData_data_basic_002.phpt
new file mode 100644
index 000000000..394b316fa
--- /dev/null
+++ b/ext/dom/tests/DOMCharacterData_data_basic_002.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Create CDATA section and change it using DOMcreateCDATASection
+--CREDITS--
+Nic Rosental nicrosental@gmail.com
+# TestFest Atlanta 2009-5-28
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+$document = new DOMDocument;
+$root = $document->createElement('root');
+$document->appendChild($root);
+
+$cdata = $document->createCDATASection('t');
+$root->appendChild($cdata);
+print $document->saveXML()."\n";
+
+$cdata->data = 100;
+print $document->saveXML()."\n";
+
+?>
+--EXPECT--
+<?xml version="1.0"?>
+<root><![CDATA[t]]></root>
+
+<?xml version="1.0"?>
+<root><![CDATA[100]]></root>
diff --git a/ext/dom/tests/DOMCharacterData_length_error_001.phpt b/ext/dom/tests/DOMCharacterData_length_error_001.phpt
new file mode 100755
index 000000000..87c9377b3
--- /dev/null
+++ b/ext/dom/tests/DOMCharacterData_length_error_001.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Invalid State Error when getting length on DOMCharacterData out of content.
+--CREDIT--
+Jason Bouffard <jbouffard1@yahoo.com>
+# TestFest Atlanta 2009-05-14
+--FILE--
+<?php
+$character_data = new DOMCharacterData();
+print $character_data->length;
+?>
+--EXPECTF--
+Warning: main(): Invalid State Error in %s \ No newline at end of file
diff --git a/ext/dom/tests/DOMCharacterData_substringData_basic_001.phpt b/ext/dom/tests/DOMCharacterData_substringData_basic_001.phpt
new file mode 100644
index 000000000..b9d73e181
--- /dev/null
+++ b/ext/dom/tests/DOMCharacterData_substringData_basic_001.phpt
@@ -0,0 +1,21 @@
+--TEST--
+__DOMCharacterData::substringData pull mid section of string
+--CREDITS--
+Nic Rosental nicrosental@gmail.com
+# TestFest Atlanta 2009-5-28
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+$document = new DOMDocument;
+$root = $document->createElement('root');
+$document->appendChild($root);
+
+$cdata = $document->createCDATASection('testfest');
+$root->appendChild($cdata);
+print $cdata->substringData(1, 6);
+
+?>
+--EXPECT--
+estfes \ No newline at end of file
diff --git a/ext/dom/tests/DOMDocument_config_basic.phpt b/ext/dom/tests/DOMDocument_config_basic.phpt
new file mode 100644
index 000000000..947743abe
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_config_basic.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Tests DOMDocument::config read
+--CREDITS--
+Chris Snyder <chsnyder@gmail.com>
+# TestFest 2009 NYPHP
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+// create dom document
+$dom = new DOMDocument;
+echo "DOMDocument created\n";
+
+$test = $dom->config;
+echo "Read config:\n";
+var_dump( $test );
+
+// note -- will always be null as DOMConfiguration is not implemented in PHP
+
+echo "Done\n";
+?>
+--EXPECT--
+DOMDocument created
+Read config:
+NULL
+Done
diff --git a/ext/dom/tests/DOMDocument_createEntityReference_basic.phpt b/ext/dom/tests/DOMDocument_createEntityReference_basic.phpt
new file mode 100644
index 000000000..4f4ddf176
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_createEntityReference_basic.phpt
@@ -0,0 +1,19 @@
+--TEST--
+DOMDocument::createEntityReference() should create a new entity reference node
+--CREDITS--
+Knut Urdalen <knut@php.net>
+#PHPTestFest2009 Norway 2009-06-09 \o/
+--SKIPIF--
+<?php
+require_once dirname(__FILE__) .'/skipif.inc';
+?>
+--FILE--
+<?php
+$dom = new DOMDocument('1.0');
+$ref = $dom->createEntityReference('nbsp');
+$dom->appendChild($ref);
+echo $dom->saveXML();
+?>
+--EXPECTF--
+<?xml version="1.0"?>
+&nbsp;
diff --git a/ext/dom/tests/DOMDocument_documentURI_basic.phpt b/ext/dom/tests/DOMDocument_documentURI_basic.phpt
new file mode 100644
index 000000000..e40a42b96
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_documentURI_basic.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Tests DOMDocument::documentURI read and write
+--CREDITS--
+Chris Snyder <chsnyder@gmail.com>
+# TestFest 2009 NYPHP
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+// create dom document
+$dom = new DOMDocument;
+$xml = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!DOCTYPE s1 PUBLIC "http://www.ibm.com/example.dtd" "example.dtd">
+<s1>foo</s1>';
+$dom->loadXML($xml);
+if(!$dom) {
+ echo "Error while parsing the document\n";
+ exit;
+}
+echo "DOMDocument created\n";
+
+$test = $dom->documentURI;
+echo "Read initial documentURI:\n";
+echo $test."\n";
+
+$dom->documentURI = 'http://dom.example.org/example.xml';
+$test = $dom->documentURI;
+echo "Set documentURI to a URL, reading again:\n";
+var_dump( $test );
+
+echo "Done\n";
+?>
+--EXPECTF--
+DOMDocument created
+Read initial documentURI:
+%s
+Set documentURI to a URL, reading again:
+string(34) "http://dom.example.org/example.xml"
+Done
diff --git a/ext/dom/tests/DOMDocument_encoding_basic.phpt b/ext/dom/tests/DOMDocument_encoding_basic.phpt
new file mode 100644
index 000000000..9fc099bfe
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_encoding_basic.phpt
@@ -0,0 +1,52 @@
+--TEST--
+DOMDocument::$encoding - read/write tests (dom_document_encoding_read/dom_document_encoding_write)
+--CREDITS--
+Hans Zaunere
+# TestFest 2009 NYPHP
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+require_once('dom_test.inc');
+
+$dom = new DOMDocument;
+$dom->loadXML($xmlstr);
+
+if( !$dom )
+{
+ echo "Error while parsing the document\n";
+ exit;
+}
+
+echo "Empty Encoding Read: {$dom->encoding}\n";
+
+$ret = $dom->encoding = 'NYPHP DOMinatrix';
+echo "Adding invalid encoding: $ret\n";
+
+$ret = $dom->encoding = 'ISO-8859-1';
+echo "Adding ISO-8859-1 encoding: $ret\n";
+echo "ISO-8859-1 Encoding Read: {$dom->encoding}\n";
+
+$ret = $dom->encoding = 'UTF-8';
+echo "Adding UTF-8 encoding: $ret\n";
+echo "UTF-8 Encoding Read: {$dom->encoding}\n";
+
+$ret = $dom->encoding = 'UTF-16';
+echo "Adding UTF-16 encoding: $ret\n";
+echo "UTF-16 Encoding Read: {$dom->encoding}\n";
+
+
+?>
+--EXPECTF--
+Empty Encoding Read:
+
+Warning: main(): Invalid Document Encoding in %s on line %d
+Adding invalid encoding: NYPHP DOMinatrix
+Adding ISO-8859-1 encoding: ISO-8859-1
+ISO-8859-1 Encoding Read: ISO-8859-1
+Adding UTF-8 encoding: UTF-8
+UTF-8 Encoding Read: UTF-8
+Adding UTF-16 encoding: UTF-16
+UTF-16 Encoding Read: UTF-16
+
diff --git a/ext/dom/tests/DOMDocument_implementationRead_basic.phpt b/ext/dom/tests/DOMDocument_implementationRead_basic.phpt
new file mode 100644
index 000000000..17daddf38
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_implementationRead_basic.phpt
@@ -0,0 +1,21 @@
+--TEST--
+DOMDocument::DOMImplementation - basic test for DomDocument::DOMImplementation
+--CREDITS--
+Lev Radin <prokurator@gmail.com>
+# TestFest 2009 NYPHP
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+$doc = new DOMDocument;
+$doc->load(dirname(__FILE__)."/book.xml");
+
+var_dump($doc->implementation);
+
+
+?>
+--EXPECTF--
+object(DOMImplementation)#%d (0) {
+}
+
diff --git a/ext/dom/tests/DOMDocument_preserveWhiteSpace_basic.phpt b/ext/dom/tests/DOMDocument_preserveWhiteSpace_basic.phpt
new file mode 100644
index 000000000..a772bc856
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_preserveWhiteSpace_basic.phpt
@@ -0,0 +1,23 @@
+--TEST--
+DOMDocument::$preserveWhiteSpace - test ability to read and write property
+--CREDITS--
+Lev Radin <prokurator@gmail.com>
+# TestFest 2009 NYPHP
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+$doc = new DOMDocument;
+$doc->load(dirname(__FILE__)."/book.xml");
+
+var_dump($doc->preserveWhiteSpace);
+
+$doc->preserveWhiteSpace = false;
+var_dump($doc->preserveWhiteSpace);
+
+?>
+--EXPECT--
+bool(true)
+bool(false)
+
diff --git a/ext/dom/tests/DOMDocument_preserveWhiteSpace_variations.phpt b/ext/dom/tests/DOMDocument_preserveWhiteSpace_variations.phpt
new file mode 100644
index 000000000..e467f56aa
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_preserveWhiteSpace_variations.phpt
@@ -0,0 +1,40 @@
+--TEST--
+DOMDocument::$preserveWhiteSpace - test ability to read and write property
+--CREDITS--
+Lev Radin <prokurator@gmail.com>
+# TestFest 2009 NYPHP
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+echo "Load document with preserveWhiteSpace on\n";
+$doc = new DOMDocument;
+$doc->load(dirname(__FILE__)."/book.xml");
+echo $doc->saveXML();
+
+
+echo "\nLoad document with preserveWhiteSpace off\n";
+$doc = new DOMDocument;
+$doc->preserveWhiteSpace = false;
+$doc->load(dirname(__FILE__)."/book.xml");
+echo $doc->saveXML();
+
+?>
+--EXPECT--
+Load document with preserveWhiteSpace on
+<?xml version="1.0"?>
+<books>
+ <book>
+ <title>The Grapes of Wrath</title>
+ <author>John Steinbeck</author>
+ </book>
+ <book>
+ <title>The Pearl</title>
+ <author>John Steinbeck</author>
+ </book>
+</books>
+
+Load document with preserveWhiteSpace off
+<?xml version="1.0"?>
+<books><book><title>The Grapes of Wrath</title><author>John Steinbeck</author></book><book><title>The Pearl</title><author>John Steinbeck</author></book></books>
diff --git a/ext/dom/tests/DOMDocument_resolveExternals_basic.phpt b/ext/dom/tests/DOMDocument_resolveExternals_basic.phpt
new file mode 100644
index 000000000..ccada3fe9
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_resolveExternals_basic.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Tests DOMDocument::resoleExternals get and set
+--CREDITS--
+Chris Snyder <chsnyder@gmail.com>
+# TestFest 2009 NYPHP
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+// create dom document
+$dom = new DOMDocument;
+$xml = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<h1>&quot;Foo&quot;</h1>';
+$dom->loadXML($xml);
+if(!$dom) {
+ echo "Error while parsing the document\n";
+ exit;
+}
+echo "DOMDocument with external entities created\n";
+
+$test = $dom->resolveExternals;
+echo "Read initial resolveExternals:\n";
+var_dump( $test );
+
+$dom->resolveExternals = TRUE;
+$test = $dom->resolveExternals;
+echo "Set resolveExternals to TRUE, reading again:\n";
+var_dump( $test );
+
+/**
+ * Don't bother testing the resolveExternals functionality here, it throws warnings on html dtd
+ *
+echo "Reloading xml with resolveExternals turned on\n";
+$dom->loadXML($xml);
+$test = $dom->saveXML();
+var_dump( $test );
+ */
+
+echo "Done";
+?>
+--EXPECT--
+DOMDocument with external entities created
+Read initial resolveExternals:
+bool(false)
+Set resolveExternals to TRUE, reading again:
+bool(true)
+Done \ No newline at end of file
diff --git a/ext/dom/tests/DOMDocument_saveHTMLFile_basic.phpt b/ext/dom/tests/DOMDocument_saveHTMLFile_basic.phpt
new file mode 100644
index 000000000..dd0824b0d
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_saveHTMLFile_basic.phpt
@@ -0,0 +1,29 @@
+--TEST--
+DOMDocument::saveHTMLFile() should dump the internal document into a file using HTML formatting
+--CREDITS--
+Knut Urdalen <knut@php.net>
+#PHPTestFest2009 Norway 2009-06-09 \o/
+--SKIPIF--
+<?php
+require_once dirname(__FILE__) .'/skipif.inc';
+?>
+--FILE--
+<?php
+$filename = dirname(__FILE__)."/tmp_savehtmlfile".time().".html";
+$doc = new DOMDocument('1.0');
+$root = $doc->createElement('html');
+$root = $doc->appendChild($root);
+$head = $doc->createElement('head');
+$head = $root->appendChild($head);
+$title = $doc->createElement('title');
+$title = $head->appendChild($title);
+$text = $doc->createTextNode('This is the title');
+$text = $title->appendChild($text);
+$bytes = $doc->saveHTMLFile($filename);
+var_dump($bytes);
+echo file_get_contents($filename);
+unlink($filename);
+?>
+--EXPECTF--
+int(126)
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>This is the title</title></head></html>
diff --git a/ext/dom/tests/DOMDocument_saveHTMLFile_error1.phpt b/ext/dom/tests/DOMDocument_saveHTMLFile_error1.phpt
new file mode 100644
index 000000000..d4dfbe8fe
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_saveHTMLFile_error1.phpt
@@ -0,0 +1,24 @@
+--TEST--
+DOMDocument::saveHTMLFile() should fail if no parameter is given
+--CREDITS--
+Knut Urdalen <knut@php.net>
+#PHPTestFest2009 Norway 2009-06-09 \o/
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+?>
+--FILE--
+<?php
+$doc = new DOMDocument('1.0');
+$root = $doc->createElement('html');
+$root = $doc->appendChild($root);
+$head = $doc->createElement('head');
+$head = $root->appendChild($head);
+$title = $doc->createElement('title');
+$title = $head->appendChild($title);
+$text = $doc->createTextNode('This is the title');
+$text = $title->appendChild($text);
+$doc->saveHTMLFile();
+?>
+--EXPECTF--
+Warning: DOMDocument::saveHTMLFile() expects exactly 1 parameter, 0 given in %s on line %d
diff --git a/ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt b/ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt
new file mode 100644
index 000000000..33e07c641
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt
@@ -0,0 +1,15 @@
+--TEST--
+DOMDocument::saveHTMLFile() should fail if called statically
+--CREDITS--
+Knut Urdalen <knut@php.net>
+#PHPTestFest2009 Norway 2009-06-09 \o/
+--SKIPIF--
+<?php
+require_once dirname(__FILE__) .'/skipif.inc';
+?>
+--FILE--
+<?php
+DOMDocument::saveHTMLFile();
+?>
+--EXPECTF--
+Fatal error: Non-static method DOMDocument::saveHTMLFile() cannot be called statically in %s on line %d
diff --git a/ext/dom/tests/DOMDocument_saveHTMLFile_formatOutput.phpt b/ext/dom/tests/DOMDocument_saveHTMLFile_formatOutput.phpt
new file mode 100644
index 000000000..5aece3780
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_saveHTMLFile_formatOutput.phpt
@@ -0,0 +1,33 @@
+--TEST--
+DOMDocument::saveHTMLFile() should format output on demand
+--CREDITS--
+Knut Urdalen <knut@php.net>
+#PHPTestFest2009 Norway 2009-06-09 \o/
+--SKIPIF--
+<?php
+require_once dirname(__FILE__) .'/skipif.inc';
+?>
+--FILE--
+<?php
+$filename = dirname(__FILE__)."/tmp_savehtmlfile".time().".html";
+$doc = new DOMDocument('1.0');
+$doc->formatOutput = true;
+$root = $doc->createElement('html');
+$root = $doc->appendChild($root);
+$head = $doc->createElement('head');
+$head = $root->appendChild($head);
+$title = $doc->createElement('title');
+$title = $head->appendChild($title);
+$text = $doc->createTextNode('This is the title');
+$text = $title->appendChild($text);
+$bytes = $doc->saveHTMLFile($filename);
+var_dump($bytes);
+echo file_get_contents($filename);
+unlink($filename);
+?>
+--EXPECTF--
+int(129)
+<html><head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>This is the title</title>
+</head></html>
diff --git a/ext/dom/tests/DOMDocument_saveHTMLFile_invalid_filename.phpt b/ext/dom/tests/DOMDocument_saveHTMLFile_invalid_filename.phpt
new file mode 100644
index 000000000..d5c6a797e
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_saveHTMLFile_invalid_filename.phpt
@@ -0,0 +1,25 @@
+--TEST--
+DOMDocument::saveHTMLFile() should fail with invalid filename
+--CREDITS--
+Knut Urdalen <knut@php.net>
+#PHPTestFest2009 Norway 2009-06-09 \o/
+--SKIPIF--
+<?php
+require_once dirname(__FILE__) .'/skipif.inc';
+?>
+--FILE--
+<?php
+$filename = null;
+$doc = new DOMDocument('1.0');
+$root = $doc->createElement('html');
+$root = $doc->appendChild($root);
+$head = $doc->createElement('head');
+$head = $root->appendChild($head);
+$title = $doc->createElement('title');
+$title = $head->appendChild($title);
+$text = $doc->createTextNode('This is the title');
+$text = $title->appendChild($text);
+$bytes = $doc->saveHTMLFile($filename);
+?>
+--EXPECTF--
+Warning: DOMDocument::saveHTMLFile(): Invalid Filename in %s on line %d
diff --git a/ext/dom/tests/DOMDocument_saveHTML_basic.phpt b/ext/dom/tests/DOMDocument_saveHTML_basic.phpt
new file mode 100644
index 000000000..76f1ed0ab
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_saveHTML_basic.phpt
@@ -0,0 +1,24 @@
+--TEST--
+DOMDocument::saveHTML() should dump the internal document into a string using HTML formatting
+--CREDITS--
+Knut Urdalen <knut@php.net>
+#PHPTestFest2009 Norway 2009-06-09 \o/
+--SKIPIF--
+<?php
+require_once dirname(__FILE__) .'/skipif.inc';
+?>
+--FILE--
+<?php
+$doc = new DOMDocument('1.0');
+$root = $doc->createElement('html');
+$root = $doc->appendChild($root);
+$head = $doc->createElement('head');
+$head = $root->appendChild($head);
+$title = $doc->createElement('title');
+$title = $head->appendChild($title);
+$text = $doc->createTextNode('This is the title');
+$text = $title->appendChild($text);
+echo $doc->saveHTML();
+?>
+--EXPECTF--
+<html><head><title>This is the title</title></head></html>
diff --git a/ext/dom/tests/DOMDocument_saveHTML_error1.phpt b/ext/dom/tests/DOMDocument_saveHTML_error1.phpt
new file mode 100644
index 000000000..78718de8e
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_saveHTML_error1.phpt
@@ -0,0 +1,24 @@
+--TEST--
+DOMDocument::saveHTML() should fail if a parameter is given
+--CREDITS--
+Knut Urdalen <knut@php.net>
+#PHPTestFest2009 Norway 2009-06-09 \o/
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+?>
+--FILE--
+<?php
+$doc = new DOMDocument('1.0');
+$root = $doc->createElement('html');
+$root = $doc->appendChild($root);
+$head = $doc->createElement('head');
+$head = $root->appendChild($head);
+$title = $doc->createElement('title');
+$title = $head->appendChild($title);
+$text = $doc->createTextNode('This is the title');
+$text = $title->appendChild($text);
+echo $doc->saveHTML(true);
+?>
+--EXPECTF--
+Warning: DOMDocument::saveHTML() expects exactly 0 parameters, 1 given in %s on line %d
diff --git a/ext/dom/tests/DOMDocument_saveHTML_error2.phpt b/ext/dom/tests/DOMDocument_saveHTML_error2.phpt
new file mode 100644
index 000000000..614605b34
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_saveHTML_error2.phpt
@@ -0,0 +1,15 @@
+--TEST--
+DOMDocument::saveHTML() should fail if called statically
+--CREDITS--
+Knut Urdalen <knut@php.net>
+#PHPTestFest2009 Norway 2009-06-09 \o/
+--SKIPIF--
+<?php
+require_once dirname(__FILE__) .'/skipif.inc';
+?>
+--FILE--
+<?php
+DOMDocument::saveHTML(true);
+?>
+--EXPECTF--
+Fatal error: Non-static method DOMDocument::saveHTML() cannot be called statically in %s on line %d
diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_basic.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_basic.phpt
new file mode 100755
index 000000000..38bc3fa3c
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_schemaValidateSource_basic.phpt
@@ -0,0 +1,22 @@
+--TEST--
+DomDocument::schemaValidateSource() - basic
+--CREDITS--
+Daniel Convissor <danielc@php.net>
+# TestFest 2009 NYPHP
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+$doc = new DOMDocument;
+
+$doc->load(dirname(__FILE__)."/book.xml");
+
+$xsd = file_get_contents(dirname(__FILE__)."/book.xsd");
+
+$result = $doc->schemaValidateSource($xsd);
+var_dump($result);
+
+?>
+--EXPECT--
+bool(true)
diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_error1.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_error1.phpt
new file mode 100755
index 000000000..51eb82e32
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_schemaValidateSource_error1.phpt
@@ -0,0 +1,29 @@
+--TEST--
+DomDocument::schemaValidateSource() - string that is not a schema
+--CREDITS--
+Daniel Convissor <danielc@php.net>
+# TestFest 2009 NYPHP
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+$doc = new DOMDocument;
+
+$doc->load(dirname(__FILE__)."/book.xml");
+
+$result = $doc->schemaValidateSource('string that is not a schema');
+var_dump($result);
+
+?>
+--EXPECTF--
+Warning: DOMDocument::schemaValidateSource(): Entity: line 1: parser error : Start tag expected, '<' not found in %s.php on line %d
+
+Warning: DOMDocument::schemaValidateSource(): string that is not a schema in %s.php on line %d
+
+Warning: DOMDocument::schemaValidateSource(): ^ in %s.php on line %d
+
+Warning: DOMDocument::schemaValidateSource(): Failed to parse the XML resource 'in_memory_buffer'. in %s.php on line %d
+
+Warning: DOMDocument::schemaValidateSource(): Invalid Schema in %s.php on line %d
+bool(false)
diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt
new file mode 100755
index 000000000..41a833b5a
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt
@@ -0,0 +1,23 @@
+--TEST--
+DomDocument::schemaValidateSource() - non-conforming schema
+--CREDITS--
+Daniel Convissor <danielc@php.net>
+# TestFest 2009 NYPHP
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+$doc = new DOMDocument;
+
+$doc->load(dirname(__FILE__)."/book.xml");
+
+$xsd = file_get_contents(dirname(__FILE__)."/book-non-conforming-schema.xsd");
+
+$result = $doc->schemaValidateSource($xsd);
+var_dump($result);
+
+?>
+--EXPECTF--
+Warning: DOMDocument::schemaValidateSource(): Element 'books': No matching global declaration available for the validation root. in %s.php on line %d
+bool(false)
diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_error3.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_error3.phpt
new file mode 100755
index 000000000..93dd79260
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_schemaValidateSource_error3.phpt
@@ -0,0 +1,21 @@
+--TEST--
+DomDocument::schemaValidateSource() - empty string for schema string
+--CREDITS--
+Daniel Convissor <danielc@php.net>
+# TestFest 2009 NYPHP
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+$doc = new DOMDocument;
+
+$doc->load(dirname(__FILE__)."/book.xml");
+
+$result = $doc->schemaValidateSource('');
+var_dump($result);
+
+?>
+--EXPECTF--
+Warning: DOMDocument::schemaValidateSource(): Invalid Schema source in %s.php on line %d
+bool(false)
diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_error4.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_error4.phpt
new file mode 100755
index 000000000..65c8d8678
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_schemaValidateSource_error4.phpt
@@ -0,0 +1,21 @@
+--TEST--
+DomDocument::schemaValidateSource() - pass no parameters
+--CREDITS--
+Daniel Convissor <danielc@php.net>
+# TestFest 2009 NYPHP
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+$doc = new DOMDocument;
+
+$doc->load(dirname(__FILE__)."/book.xml");
+
+$result = $doc->schemaValidateSource();
+var_dump($result);
+
+?>
+--EXPECTF--
+Warning: DOMDocument::schemaValidateSource() expects exactly 1 parameter, 0 given in %s.php on line %d
+NULL
diff --git a/ext/dom/tests/DOMDocument_schemaValidate_basic.phpt b/ext/dom/tests/DOMDocument_schemaValidate_basic.phpt
new file mode 100755
index 000000000..eec790de6
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_schemaValidate_basic.phpt
@@ -0,0 +1,20 @@
+--TEST--
+DomDocument::schemaValidate() - basic
+--CREDITS--
+Daniel Convissor <danielc@php.net>
+# TestFest 2009 NYPHP
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+$doc = new DOMDocument;
+
+$doc->load(dirname(__FILE__)."/book.xml");
+
+$result = $doc->schemaValidate(dirname(__FILE__)."/book.xsd");
+var_dump($result);
+
+?>
+--EXPECT--
+bool(true)
diff --git a/ext/dom/tests/DOMDocument_schemaValidate_error1.phpt b/ext/dom/tests/DOMDocument_schemaValidate_error1.phpt
new file mode 100755
index 000000000..594c3c429
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_schemaValidate_error1.phpt
@@ -0,0 +1,29 @@
+--TEST--
+DomDocument::schemaValidate() - file that is not a schema
+--CREDITS--
+Daniel Convissor <danielc@php.net>
+# TestFest 2009 NYPHP
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+$doc = new DOMDocument;
+
+$doc->load(dirname(__FILE__)."/book.xml");
+
+$result = $doc->schemaValidate(dirname(__FILE__)."/book-not-a-schema.xsd");
+var_dump($result);
+
+?>
+--EXPECTF--
+Warning: DOMDocument::schemaValidate(): %sbook-not-a-schema.xsd:1: parser error : Start tag expected, '<' not found in %s.php on line %d
+
+Warning: DOMDocument::schemaValidate(): Let's see what happens upon parsing a file that doesn't contain a schema. in %s.php on line %d
+
+Warning: DOMDocument::schemaValidate(): ^ in %s.php on line %d
+
+Warning: DOMDocument::schemaValidate(): Failed to parse the XML resource '%sbook-not-a-schema.xsd'. in %s.php on line %d
+
+Warning: DOMDocument::schemaValidate(): Invalid Schema in %s.php on line %d
+bool(false)
diff --git a/ext/dom/tests/DOMDocument_schemaValidate_error2.phpt b/ext/dom/tests/DOMDocument_schemaValidate_error2.phpt
new file mode 100755
index 000000000..5ffd53365
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_schemaValidate_error2.phpt
@@ -0,0 +1,21 @@
+--TEST--
+DomDocument::schemaValidate() - non-conforming schema file
+--CREDITS--
+Daniel Convissor <danielc@php.net>
+# TestFest 2009 NYPHP
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+$doc = new DOMDocument;
+
+$doc->load(dirname(__FILE__)."/book.xml");
+
+$result = $doc->schemaValidate(dirname(__FILE__)."/book-non-conforming-schema.xsd");
+var_dump($result);
+
+?>
+--EXPECTF--
+Warning: DOMDocument::schemaValidate(): Element 'books': No matching global declaration available for the validation root. in %s.php on line %d
+bool(false)
diff --git a/ext/dom/tests/DOMDocument_schemaValidate_error3.phpt b/ext/dom/tests/DOMDocument_schemaValidate_error3.phpt
new file mode 100755
index 000000000..275204f92
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_schemaValidate_error3.phpt
@@ -0,0 +1,21 @@
+--TEST--
+DomDocument::schemaValidate() - empty string for schema file name
+--CREDITS--
+Daniel Convissor <danielc@php.net>
+# TestFest 2009 NYPHP
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+$doc = new DOMDocument;
+
+$doc->load(dirname(__FILE__)."/book.xml");
+
+$result = $doc->schemaValidate('');
+var_dump($result);
+
+?>
+--EXPECTF--
+Warning: DOMDocument::schemaValidate(): Invalid Schema source in %s.php on line %d
+bool(false)
diff --git a/ext/dom/tests/DOMDocument_schemaValidate_error4.phpt b/ext/dom/tests/DOMDocument_schemaValidate_error4.phpt
new file mode 100755
index 000000000..d4817deca
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_schemaValidate_error4.phpt
@@ -0,0 +1,21 @@
+--TEST--
+DomDocument::schemaValidate() - pass no parameters
+--CREDITS--
+Daniel Convissor <danielc@php.net>
+# TestFest 2009 NYPHP
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+$doc = new DOMDocument;
+
+$doc->load(dirname(__FILE__)."/book.xml");
+
+$result = $doc->schemaValidate();
+var_dump($result);
+
+?>
+--EXPECTF--
+Warning: DOMDocument::schemaValidate() expects exactly 1 parameter, 0 given in %s.php on line %d
+NULL
diff --git a/ext/dom/tests/DOMDocument_schemaValidate_error5.phpt b/ext/dom/tests/DOMDocument_schemaValidate_error5.phpt
new file mode 100755
index 000000000..d3f0658c1
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_schemaValidate_error5.phpt
@@ -0,0 +1,25 @@
+--TEST--
+DomDocument::schemaValidate() - non-existant schema file
+--CREDITS--
+Daniel Convissor <danielc@php.net>
+# TestFest 2009 NYPHP
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+$doc = new DOMDocument;
+
+$doc->load(dirname(__FILE__)."/book.xml");
+
+$result = $doc->schemaValidate(dirname(__FILE__)."/non-existant-file");
+var_dump($result);
+
+?>
+--EXPECTF--
+Warning: DOMDocument::schemaValidate(): I/O warning : failed to load external entity "%snon-existant-file" in %s.php on line %d
+
+Warning: DOMDocument::schemaValidate(): Failed to locate the main schema resource at '%s/non-existant-file'. in %s.php on line %d
+
+Warning: DOMDocument::schemaValidate(): Invalid Schema in %s.php on line %d
+bool(false)
diff --git a/ext/dom/tests/DOMDocument_standalone_basic.phpt b/ext/dom/tests/DOMDocument_standalone_basic.phpt
new file mode 100644
index 000000000..2316a3897
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_standalone_basic.phpt
@@ -0,0 +1,48 @@
+--TEST--
+Tests DOMDocument::standalone get, set, and functionality
+--CREDITS--
+Chris Snyder <chsnyder@gmail.com>
+# TestFest 2009 NYPHP
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+// create dom document
+$dom = new DOMDocument;
+$xml = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!DOCTYPE s1 PUBLIC "http://www.ibm.com/example.dtd" "example.dtd">
+<s1>foo</s1>';
+$dom->loadXML($xml);
+if(!$dom) {
+ echo "Error while parsing the document\n";
+ exit;
+}
+echo "Standalone DOMDocument created\n";
+
+$test = $dom->standalone;
+echo "Read initial standalone:\n";
+var_dump( $test );
+
+$dom->standalone = FALSE;
+$test = $dom->standalone;
+echo "Set standalone to FALSE, reading again:\n";
+var_dump( $test );
+
+$test = $dom->saveXML();
+echo "Document is no longer standalone\n";
+var_dump( $test );
+
+echo "Done";
+?>
+--EXPECT--
+Standalone DOMDocument created
+Read initial standalone:
+bool(true)
+Set standalone to FALSE, reading again:
+bool(false)
+Document is no longer standalone
+string(136) "<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE s1 PUBLIC "http://www.ibm.com/example.dtd" "example.dtd">
+<s1>foo</s1>
+"
+Done \ No newline at end of file
diff --git a/ext/dom/tests/DOMDocument_strictErrorChecking_basic.phpt b/ext/dom/tests/DOMDocument_strictErrorChecking_basic.phpt
new file mode 100644
index 000000000..9ad55a4ad
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_strictErrorChecking_basic.phpt
@@ -0,0 +1,22 @@
+--TEST--
+DomDocument::$strictErrorChecking - basic test
+--CREDITS--
+Vincent Tsao <notes4vincent@gmail.com>
+# TestFest 2009 NYPHP
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+$doc = new DOMDocument;
+$doc->load(dirname(__FILE__)."/book.xml");
+
+var_dump($doc->strictErrorChecking);
+
+$doc->strictErrorChecking = false;
+var_dump($doc->strictErrorChecking);
+
+?>
+--EXPECT--
+bool(true)
+bool(false)
diff --git a/ext/dom/tests/DOMDocument_strictErrorChecking_variation.phpt b/ext/dom/tests/DOMDocument_strictErrorChecking_variation.phpt
new file mode 100644
index 000000000..b6d94f9de
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_strictErrorChecking_variation.phpt
@@ -0,0 +1,59 @@
+--TEST--
+DomDocument::$strictErrorChecking - ensure turning off actually works
+--CREDITS--
+Vincent Tsao <notes4vincent@gmail.com>
+(and Dan Convissor)
+# TestFest 2009 NYPHP
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+echo "Load document\n";
+$doc = new DOMDocument;
+$doc->load(dirname(__FILE__)."/book.xml");
+
+echo "See if strictErrorChecking is on\n";
+var_dump($doc->strictErrorChecking);
+
+echo "Should throw DOMException when strictErrorChecking is on\n";
+try {
+ $attr = $doc->createAttribute(0);
+} catch (DOMException $e) {
+ echo "GOOD. DOMException thrown\n";
+ echo $e->getMessage() ."\n";
+} catch (Exception $e) {
+ echo "OOPS. Other exception thrown\n";
+}
+
+
+echo "Turn strictErrorChecking off\n";
+$doc->strictErrorChecking = false;
+
+echo "See if strictErrorChecking is off\n";
+var_dump($doc->strictErrorChecking);
+
+echo "Should raise PHP error because strictErrorChecking is off\n";
+try {
+ $attr = $doc->createAttribute(0);
+} catch (DOMException $e) {
+ echo "OOPS. DOMException thrown\n";
+ echo $e->getMessage() ."\n";
+} catch (Exception $e) {
+ echo "OOPS. Other exception thrown\n";
+}
+
+?>
+--EXPECTF--
+Load document
+See if strictErrorChecking is on
+bool(true)
+Should throw DOMException when strictErrorChecking is on
+GOOD. DOMException thrown
+Invalid Character Error
+Turn strictErrorChecking off
+See if strictErrorChecking is off
+bool(false)
+Should raise PHP error because strictErrorChecking is off
+
+Warning: DOMDocument::createAttribute(): Invalid Character Error in %sDOMDocument_strictErrorChecking_variation.php on line %d
diff --git a/ext/dom/tests/DOMDocument_validate_basic.phpt b/ext/dom/tests/DOMDocument_validate_basic.phpt
new file mode 100644
index 000000000..7c0eec8dd
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_validate_basic.phpt
@@ -0,0 +1,31 @@
+--TEST--
+DOMDocument::validate() should validate an internal DTD declaration
+--CREDITS--
+Knut Urdalen <knut@php.net>
+#PHPTestFest2009 Norway 2009-06-09 \o/
+--SKIPIF--
+<?php
+require_once dirname(__FILE__) .'/skipif.inc';
+?>
+--FILE--
+<?php
+$xml = "<?xml version=\"1.0\"?>
+<!DOCTYPE note [
+<!ELEMENT note (to,from,heading,body)>
+<!ELEMENT to (#PCDATA)>
+<!ELEMENT from (#PCDATA)>
+<!ELEMENT heading (#PCDATA)>
+<!ELEMENT body (#PCDATA)>
+]>
+<note>
+<to>Tove</to>
+<from>Jani</from>
+<heading>Reminder</heading>
+<body>Don't forget me this weekend</body>
+</note>";
+$dom = new DOMDocument('1.0');
+$dom->loadXML($xml);
+var_dump($dom->validate());
+?>
+--EXPECTF--
+bool(true)
diff --git a/ext/dom/tests/DOMDocument_validate_error1.phpt b/ext/dom/tests/DOMDocument_validate_error1.phpt
new file mode 100644
index 000000000..8e1e72fe0
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_validate_error1.phpt
@@ -0,0 +1,16 @@
+--TEST--
+DOMDocument::validate() should fail if any parameter is given
+--CREDITS--
+Knut Urdalen <knut@php.net>
+#PHPTestFest2009 Norway 2009-06-09 \o/
+--SKIPIF--
+<?php
+require_once dirname(__FILE__) .'/skipif.inc';
+?>
+--FILE--
+<?php
+$dom = new DOMDocument('1.0');
+$dom->validate(true);
+?>
+--EXPECTF--
+Warning: DOMDocument::validate() expects exactly 0 parameters, 1 given in %s on line %d
diff --git a/ext/dom/tests/DOMDocument_validate_error2.phpt b/ext/dom/tests/DOMDocument_validate_error2.phpt
new file mode 100644
index 000000000..fe7e4fc9d
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_validate_error2.phpt
@@ -0,0 +1,15 @@
+--TEST--
+DOMDocument::validate() should fail if called statically
+--CREDITS--
+Knut Urdalen <knut@php.net>
+#PHPTestFest2009 Norway 2009-06-09 \o/
+--SKIPIF--
+<?php
+require_once dirname(__FILE__) .'/skipif.inc';
+?>
+--FILE--
+<?php
+DOMDocument::validate();
+?>
+--EXPECTF--
+Fatal error: Non-static method DOMDocument::validate() cannot be called statically in %s on line %d
diff --git a/ext/dom/tests/DOMDocument_validate_external_dtd.phpt b/ext/dom/tests/DOMDocument_validate_external_dtd.phpt
new file mode 100644
index 000000000..51a044c54
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_validate_external_dtd.phpt
@@ -0,0 +1,19 @@
+--TEST--
+DOMDocument::validate() should validate an external DTD declaration
+--CREDITS--
+Knut Urdalen <knut@php.net>
+#PHPTestFest2009 Norway 2009-06-09 \o/
+--SKIPIF--
+<?php
+require_once dirname(__FILE__) .'/skipif.inc';
+?>
+--FILE--
+<?php
+// reusing existing xml: http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/dom.xml?view=co&content-type=text%2Fplain
+// reusing existing dtd: http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/dom.ent?view=co&content-type=text%2Fplain
+$dom = new DOMDocument('1.0');
+$dom->load(dirname(__FILE__).'/dom.xml');
+var_dump($dom->validate());
+?>
+--EXPECTF--
+bool(true)
diff --git a/ext/dom/tests/DOMDocument_validate_on_parse_basic.phpt b/ext/dom/tests/DOMDocument_validate_on_parse_basic.phpt
new file mode 100644
index 000000000..a95b0a304
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_validate_on_parse_basic.phpt
@@ -0,0 +1,38 @@
+--TEST--
+DOMDocument::$validateOnParse - read/write tests (dom_document_validate_on_parse_read/dom_document_validate_on_parse_write)
+--CREDITS--
+Hans Zaunere
+# TestFest 2009 NYPHP
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+require_once('dom_test.inc');
+
+$dom = new DOMDocument;
+$dom->loadXML($xmlstr);
+
+if( !$dom )
+{
+ echo "Error while parsing the document\n";
+ exit;
+}
+
+echo "Checking documented default value: ";
+var_dump($dom->validateOnParse);
+
+$dom->validateOnParse = TRUE;
+echo "Setting validateOnParse to TRUE: ";
+var_dump($dom->validateOnParse);
+
+$dom->validateOnParse = FALSE;
+echo "Setting validateOnParse to FALSE: ";
+var_dump($dom->validateOnParse);
+
+?>
+--EXPECT--
+Checking documented default value: bool(false)
+Setting validateOnParse to TRUE: bool(true)
+Setting validateOnParse to FALSE: bool(false)
+
diff --git a/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt b/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
new file mode 100644
index 000000000..6aa390ca9
--- /dev/null
+++ b/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
@@ -0,0 +1,49 @@
+--TEST--
+DOMDocument::$validateOnParse - effectual determination (dom_document_validate_on_parse_read/dom_document_validate_on_parse_write)
+--CREDITS--
+Hans Zaunere
+# TestFest 2009 NYPHP
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+
+// need external DTD/XML docs
+if( @file_get_contents('http://www.php.net/') === FALSE )
+ exit('skip network not available');
+?>
+--FILE--
+<?php
+
+require_once('dom_test.inc');
+
+$XMLStringGood = file_get_contents('http://www.php.net/');
+
+$dom = new DOMDocument;
+$dom->resolveExternals = TRUE;
+
+$dom->validateOnParse = FALSE;
+echo "validateOnParse set to FALSE: \n";
+$dom->loadXML($XMLStringGood);
+echo "No Error Report Above\n";
+
+$BogusElement = $dom->createElement('NYPHP','DOMinatrix');
+$Body = $dom->getElementsByTagName('body')->item(0);
+$Body->appendChild($BogusElement);
+$XMLStringBad = $dom->saveXML();
+
+echo "validateOnParse set to TRUE: \n";
+$dom->validateOnParse = TRUE;
+$dom->loadXML($XMLStringBad);
+echo "Error Report Above\n";
+
+?>
+--EXPECTF--
+validateOnParse set to FALSE:
+No Error Report Above
+validateOnParse set to TRUE:
+
+Warning: DOMDocument::loadXML(): No declaration for element NYPHP in Entity, line: %d in %s on line %d
+
+Warning: DOMDocument::loadXML(): Element body content does not follow the DTD, expecting (p | h1 | h2 | h3 | h4 | h5 | h6 | div | ul | ol | dl | pre | hr | blockquote | address | fieldset | table | form | noscript | ins | del | script)*, got (div div div div div NYPHP) in Entity, line: %d in %s on line %d
+Error Report Above
+
diff --git a/ext/dom/tests/book-non-conforming-schema.xsd b/ext/dom/tests/book-non-conforming-schema.xsd
new file mode 100755
index 000000000..d1ecbef01
--- /dev/null
+++ b/ext/dom/tests/book-non-conforming-schema.xsd
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="make_it_fail">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="book" minOccurs="1" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="title" type="xs:string"/>
+ <xs:element name="author" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
diff --git a/ext/dom/tests/book-not-a-schema.xsd b/ext/dom/tests/book-not-a-schema.xsd
new file mode 100755
index 000000000..d89e3bbac
--- /dev/null
+++ b/ext/dom/tests/book-not-a-schema.xsd
@@ -0,0 +1 @@
+Let's see what happens upon parsing a file that doesn't contain a schema.
diff --git a/ext/dom/tests/book.xsd b/ext/dom/tests/book.xsd
new file mode 100755
index 000000000..45986fc4b
--- /dev/null
+++ b/ext/dom/tests/book.xsd
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="books">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="book" minOccurs="1" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="title" type="xs:string"/>
+ <xs:element name="author" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
diff --git a/ext/dom/tests/domdocument_createcomment_error_001.phpt b/ext/dom/tests/domdocument_createcomment_error_001.phpt
new file mode 100644
index 000000000..5df4e2047
--- /dev/null
+++ b/ext/dom/tests/domdocument_createcomment_error_001.phpt
@@ -0,0 +1,11 @@
+--TEST--
+DomDocument::CreateComment() - Incorrect Parameters
+--CREDITS--
+Clint Priest @ PhpTek09
+--FILE--
+<?php
+ $x = new DomDocument();
+ $x->createComment();
+?>
+--EXPECTF--
+Warning: DOMDocument::createComment() expects exactly 1 parameter, 0 given in %s \ No newline at end of file
diff --git a/ext/dom/tests/domdocument_createentityreference_001.phpt b/ext/dom/tests/domdocument_createentityreference_001.phpt
new file mode 100644
index 000000000..15f7df188
--- /dev/null
+++ b/ext/dom/tests/domdocument_createentityreference_001.phpt
@@ -0,0 +1,13 @@
+--TEST--
+DomDocument::CreateEntityReference() - Creates an entity reference with the appropriate name
+--CREDITS--
+Clint Priest @ PhpTek09
+--FILE--
+<?php
+ $objDoc = new DomDocument();
+
+ $objRef = $objDoc->createEntityReference('Test');
+ echo $objRef->nodeName;
+?>
+--EXPECT--
+Test \ No newline at end of file
diff --git a/ext/dom/tests/domdocument_createentityreference_002.phpt b/ext/dom/tests/domdocument_createentityreference_002.phpt
new file mode 100644
index 000000000..21d79aa4b
--- /dev/null
+++ b/ext/dom/tests/domdocument_createentityreference_002.phpt
@@ -0,0 +1,12 @@
+--TEST--
+DomDocument::CreateEntityReference() - Empty Arguments
+--CREDITS--
+Clint Priest @ PhpTek09
+--FILE--
+<?php
+ $objDoc = new DomDocument();
+
+ $objRef = $objDoc->createEntityReference();
+?>
+--EXPECTF--
+Warning: DOMDocument::createEntityReference() expects exactly 1 parameter, 0 given in %s \ No newline at end of file
diff --git a/ext/dom/text.c b/ext/dom/text.c
index c9073ea30..c658e1b76 100644
--- a/ext/dom/text.c
+++ b/ext/dom/text.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: text.c,v 1.23.2.1.2.4.2.12 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: text.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/typeinfo.c b/ext/dom/typeinfo.c
index f7e65a3eb..7c42f906e 100644
--- a/ext/dom/typeinfo.c
+++ b/ext/dom/typeinfo.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: typeinfo.c,v 1.6.2.1.2.1.2.4 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: typeinfo.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/userdatahandler.c b/ext/dom/userdatahandler.c
index 06979edc9..2b761d78e 100644
--- a/ext/dom/userdatahandler.c
+++ b/ext/dom/userdatahandler.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: userdatahandler.c,v 1.6.2.1.2.1.2.4 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: userdatahandler.c 272370 2008-12-31 11:15:49Z sebastian $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/ext/dom/xml_common.h b/ext/dom/xml_common.h
index b574fd492..9c3c6fc24 100644
--- a/ext/dom/xml_common.h
+++ b/ext/dom/xml_common.h
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: xml_common.h,v 1.23.2.1.2.2.2.4 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: xml_common.h 272370 2008-12-31 11:15:49Z sebastian $ */
#ifndef PHP_XML_COMMON_H
#define PHP_XML_COMMON_H
diff --git a/ext/dom/xpath.c b/ext/dom/xpath.c
index 38d23da94..a2fdc13dc 100644
--- a/ext/dom/xpath.c
+++ b/ext/dom/xpath.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: xpath.c,v 1.26.2.1.2.1.2.13 2009/06/06 02:40:48 mattwil Exp $ */
+/* $Id: xpath.c 281742 2009-06-06 02:40:49Z mattwil $ */
#ifdef HAVE_CONFIG_H
#include "config.h"