summaryrefslogtreecommitdiff
path: root/ext/dom
diff options
context:
space:
mode:
authorAntonio Diaz Ruiz <dejalatele@gmail.com>2013-06-25 22:09:38 +0200
committerStanislav Malyshev <stas@php.net>2013-08-10 18:02:08 -0700
commit1a5c460ea2f74c46f87e5a92631506a35eeb6aa0 (patch)
tree500bec94e5ceff9a76749f2b8ca061017ea78b0c /ext/dom
parent5f5ff92bc0c96ecc1d6b9e3bd7ec5fbc0aef7a8d (diff)
downloadphp-git-1a5c460ea2f74c46f87e5a92631506a35eeb6aa0.tar.gz
Embeds the content of the DTD in the DOCTYPE declaration of the XML files.
Diffstat (limited to 'ext/dom')
-rw-r--r--ext/dom/tests/DOMDocument_loadXML_variation4.phpt9
-rw-r--r--ext/dom/tests/book_with_dtd2.xml9
-rw-r--r--ext/dom/tests/wrong_book_with_dtd2.xml9
3 files changed, 24 insertions, 3 deletions
diff --git a/ext/dom/tests/DOMDocument_loadXML_variation4.phpt b/ext/dom/tests/DOMDocument_loadXML_variation4.phpt
index 5960daac86..4f1ea37c19 100644
--- a/ext/dom/tests/DOMDocument_loadXML_variation4.phpt
+++ b/ext/dom/tests/DOMDocument_loadXML_variation4.phpt
@@ -21,5 +21,12 @@ EXPECTED_RESULT=1
domdocumentloadxml_test_method_savexml.php
--EXPECT--
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE books SYSTEM "ext/dom/tests/books.dtd">
+<!DOCTYPE books [
+<!ENTITY entitest "entity is only for test purposes">
+<!ATTLIST title default CDATA "default title">
+<!ELEMENT books (book)*>
+<!ELEMENT book (title , author)>
+<!ELEMENT title (#PCDATA)>
+<!ELEMENT author (#PCDATA)>
+]>
<books><book><title default="default title">The Grapes of Wrath</title><author>John Steinbeck</author></book><book><title default="default title">The Pearl</title><author>John Steinbeck</author></book><book><title default="default title">entity is only for test purposes</title><author>data for test</author></book></books>
diff --git a/ext/dom/tests/book_with_dtd2.xml b/ext/dom/tests/book_with_dtd2.xml
index 1b1478d02e..aeb4f0b800 100644
--- a/ext/dom/tests/book_with_dtd2.xml
+++ b/ext/dom/tests/book_with_dtd2.xml
@@ -1,5 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE books SYSTEM "ext/dom/tests/books.dtd">
+<!DOCTYPE books [
+<!ENTITY entitest "entity is only for test purposes">
+<!ATTLIST title default CDATA "default title">
+<!ELEMENT books (book*)>
+<!ELEMENT book (title, author)>
+<!ELEMENT title (#PCDATA)>
+<!ELEMENT author (#PCDATA)>
+]>
<books>
<book>
<title>The Grapes of Wrath</title>
diff --git a/ext/dom/tests/wrong_book_with_dtd2.xml b/ext/dom/tests/wrong_book_with_dtd2.xml
index aad520f9b6..6c49deb1f5 100644
--- a/ext/dom/tests/wrong_book_with_dtd2.xml
+++ b/ext/dom/tests/wrong_book_with_dtd2.xml
@@ -1,5 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE books SYSTEM "ext/dom/tests/books.dtd">
+<!DOCTYPE books [
+<!ENTITY entitest "entity is only for test purposes">
+<!ATTLIST title default CDATA "default title">
+<!ELEMENT books (book)*>
+<!ELEMENT book (title , author)>
+<!ELEMENT title (#PCDATA)>
+<!ELEMENT author (#PCDATA)>
+]>
<books>
<book>
<title>The Grapes of Wrath</title>