source: icXML/icXML-devel/tests/src/xinclude/tests/xinclude/tests/test01.xml @ 2726

Last change on this file since 2726 was 2726, checked in by cameron, 7 years ago

Add original Xerces tests and samples directories

File size: 1.6 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!-- This test doesn't test anything in particular.  But it is an example of a
3     somewhat complicated setup. -->
4<xit:myRoot     xmlns:xit="http://www.schemaTest.org/xinclude-test"
5            xmlns:xi="http://www.w3.org/2001/XInclude"
6            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7            xsi:schemaLocation="http://www.schemaTest.org/xinclude-test tests.xsd">
8        <xi:include xmlns:test01="http://www.test.org/test02" href="../included/invalid.xml">
9                <!-- comment -->
10                <xi:fallback xmlns:test02="http://www.test.org/test02">
11                        <xi:include href="../included/invalid.xml">
12                                <invalid1 xmlns:test03="http://www.test.org/test03">
13                                        <invalid2>                             
14                                        </invalid2>
15                                </invalid1>
16                                <xi:fallback xmlns:test02="http://www.test.org/TEST02">
17                                        <child1 name="kid1"><desc>Text1</desc></child1>
18                                </xi:fallback>
19                        </xi:include>
20                </xi:fallback>
21        </xi:include>
22        <xi:include href="../included/invalid.xml">
23                <xi:fallback>
24                        <child2 name="kid2"><desc>Text2</desc></child2>
25                </xi:fallback>
26        </xi:include>
27       
28        <!-- this tests a valid include -->
29        <xi:include href="../included/include01.xml" parse="xml">
30                <xi:fallback>
31                        <!-- this should be ignored -->
32                        <child2>Text2</child2>
33                </xi:fallback> 
34        </xi:include>
35       
36        <!-- this tests that idrefs still work when an ID from an included file is used -->
37        <select name="kid3"/>
38       
39        <!-- this tests when an included file has a DTD, but the base file doesn't -->
40        <xi:include href="../included/unparsed.xml"><xi:fallback/></xi:include>
41</xit:myRoot>
Note: See TracBrowser for help on using the repository browser.