2003-10-27 15:32:44 +00:00
|
|
|
--TEST--
|
|
|
|
Test: Xinclude and Streams
|
|
|
|
--SKIPIF--
|
2003-10-31 16:12:27 +00:00
|
|
|
<?php
|
|
|
|
require_once('skipif.inc');
|
2004-12-02 16:33:36 +00:00
|
|
|
array_search('compress.zlib', stream_get_wrappers()) or die('skip compress.zlib wrapper is not available');
|
2003-10-31 16:12:27 +00:00
|
|
|
?>
|
2003-10-27 15:32:44 +00:00
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
$dom = new domdocument;
|
|
|
|
$dom->load(dirname(__FILE__)."/xinclude.xml");
|
|
|
|
$dom->xinclude();
|
2004-01-07 15:33:25 +00:00
|
|
|
print $dom->saveXML()."\n";
|
|
|
|
foreach ($dom->documentElement->childNodes as $node) {
|
|
|
|
print $node->nodeName."\n";
|
|
|
|
}
|
2003-10-27 15:32:44 +00:00
|
|
|
|
|
|
|
--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>
|
2004-01-07 15:33:25 +00:00
|
|
|
|
|
|
|
#text
|
|
|
|
book
|
|
|
|
book
|
|
|
|
#text
|