Skip to content

Commit 0d59b3d

Browse files
committed
xinclude test
1 parent 3cd8d4a commit 0d59b3d

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

ext/dom/tests/book.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<?xml version="1.0" ?>
12
<books>
23
<book>
34
<title>The Grapes of Wrath</title>

ext/dom/tests/dom_xinclude.phpt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
--TEST--
2+
Test: Xinclude and Streams
3+
--SKIPIF--
4+
<?php require_once('skipif.inc'); ?>
5+
--FILE--
6+
<?php
7+
$dom = new domdocument;
8+
$dom->load(dirname(__FILE__)."/xinclude.xml");
9+
$dom->xinclude();
10+
print $dom->saveXML();
11+
12+
--EXPECT--
13+
<?xml version="1.0"?>
14+
<foo xmlns:xi="http://www.w3.org/2001/XInclude">
15+
<book xml:base="compress.zlib://ext/dom/tests/book.xml">
16+
<title>The Grapes of Wrath</title>
17+
<author>John Steinbeck</author>
18+
</book><book xml:base="compress.zlib://ext/dom/tests/book.xml">
19+
<title>The Pearl</title>
20+
<author>John Steinbeck</author>
21+
</book>
22+
</foo>

ext/dom/tests/xinclude.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0"?>
2+
<foo xmlns:xi="http://www.w3.org/2001/XInclude">
3+
<xi:include href="compress.zlib://ext/dom/tests/book.xml#xpointer(/books/book)"/>
4+
</foo>

0 commit comments

Comments
 (0)