]> granicus.if.org Git - php/commitdiff
Embeds the content of the DTD in the DOCTYPE declaration of the XML files.
authorAntonio Diaz Ruiz <dejalatele@gmail.com>
Tue, 25 Jun 2013 20:09:38 +0000 (22:09 +0200)
committerStanislav Malyshev <stas@php.net>
Sun, 11 Aug 2013 01:02:08 +0000 (18:02 -0700)
ext/dom/tests/DOMDocument_loadXML_variation4.phpt
ext/dom/tests/book_with_dtd2.xml
ext/dom/tests/wrong_book_with_dtd2.xml

index 5960daac86585bfd8ca8a6bd7cb5fa356e2fcabb..4f1ea37c1924fe5a91a3d0cc88adec1fa1594f20 100644 (file)
@@ -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>
index 1b1478d02e4f4ca4ff3dbe9f4032e169952c3b41..aeb4f0b800d63eb41fdfbacf0692a7e04248ba35 100644 (file)
@@ -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>
index aad520f9b6b7793b958eec0544efdfd2ed006031..6c49deb1f5697370780d761d7695eecd1491a241 100644 (file)
@@ -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>