]> granicus.if.org Git - php/commitdiff
xinclude test
authorChristian Stocker <chregu@php.net>
Mon, 27 Oct 2003 15:32:44 +0000 (15:32 +0000)
committerChristian Stocker <chregu@php.net>
Mon, 27 Oct 2003 15:32:44 +0000 (15:32 +0000)
ext/dom/tests/book.xml
ext/dom/tests/dom_xinclude.phpt [new file with mode: 0644]
ext/dom/tests/xinclude.xml [new file with mode: 0644]

index ea40508e01b285ef2c77cbff3464e881fed6bc4f..95de0da86649e548e9ed00bc101b32b0b33c1615 100644 (file)
@@ -1,3 +1,4 @@
+<?xml version="1.0" ?>
 <books>
  <book>
   <title>The Grapes of Wrath</title>
diff --git a/ext/dom/tests/dom_xinclude.phpt b/ext/dom/tests/dom_xinclude.phpt
new file mode 100644 (file)
index 0000000..a5cd6ba
--- /dev/null
@@ -0,0 +1,22 @@
+--TEST--
+Test: Xinclude and Streams
+--SKIPIF--
+<?php  require_once('skipif.inc'); ?>
+--FILE--
+<?php
+$dom = new domdocument;
+$dom->load(dirname(__FILE__)."/xinclude.xml");
+$dom->xinclude();
+print $dom->saveXML();
+
+--EXPECT--
+<?xml version="1.0"?>
+<foo xmlns:xi="http://www.w3.org/2001/XInclude">
+    <book xml:base="compress.zlib://ext/dom/tests/book.xml">
+  <title>The Grapes of Wrath</title>
+  <author>John Steinbeck</author>
+ </book><book xml:base="compress.zlib://ext/dom/tests/book.xml">
+  <title>The Pearl</title>
+  <author>John Steinbeck</author>
+ </book>
+ </foo>
diff --git a/ext/dom/tests/xinclude.xml b/ext/dom/tests/xinclude.xml
new file mode 100644 (file)
index 0000000..27efa91
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<foo xmlns:xi="http://www.w3.org/2001/XInclude">
+    <xi:include href="compress.zlib://ext/dom/tests/book.xml#xpointer(/books/book)"/>
+ </foo>