Skip to content

Commit 1a5c460

Browse files
dejalatelesmalyshev
authored andcommitted
Embeds the content of the DTD in the DOCTYPE declaration of the XML files.
1 parent 5f5ff92 commit 1a5c460

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

ext/dom/tests/DOMDocument_loadXML_variation4.phpt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,12 @@ EXPECTED_RESULT=1
2121
domdocumentloadxml_test_method_savexml.php
2222
--EXPECT--
2323
<?xml version="1.0" encoding="UTF-8"?>
24-
<!DOCTYPE books SYSTEM "ext/dom/tests/books.dtd">
24+
<!DOCTYPE books [
25+
<!ENTITY entitest "entity is only for test purposes">
26+
<!ATTLIST title default CDATA "default title">
27+
<!ELEMENT books (book)*>
28+
<!ELEMENT book (title , author)>
29+
<!ELEMENT title (#PCDATA)>
30+
<!ELEMENT author (#PCDATA)>
31+
]>
2532
<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>

ext/dom/tests/book_with_dtd2.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
2-
<!DOCTYPE books SYSTEM "ext/dom/tests/books.dtd">
2+
<!DOCTYPE books [
3+
<!ENTITY entitest "entity is only for test purposes">
4+
<!ATTLIST title default CDATA "default title">
5+
<!ELEMENT books (book*)>
6+
<!ELEMENT book (title, author)>
7+
<!ELEMENT title (#PCDATA)>
8+
<!ELEMENT author (#PCDATA)>
9+
]>
310
<books>
411
<book>
512
<title>The Grapes of Wrath</title>

ext/dom/tests/wrong_book_with_dtd2.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
2-
<!DOCTYPE books SYSTEM "ext/dom/tests/books.dtd">
2+
<!DOCTYPE books [
3+
<!ENTITY entitest "entity is only for test purposes">
4+
<!ATTLIST title default CDATA "default title">
5+
<!ELEMENT books (book)*>
6+
<!ELEMENT book (title , author)>
7+
<!ELEMENT title (#PCDATA)>
8+
<!ELEMENT author (#PCDATA)>
9+
]>
310
<books>
411
<book>
512
<title>The Grapes of Wrath</title>

0 commit comments

Comments
 (0)