1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/tests/test_xinclude.xhtml Sat Feb 16 20:11:27 2008 +0000
1.3 @@ -0,0 +1,8 @@
1.4 +<?xml version="1.0"?>
1.5 +<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude">
1.6 +<body>
1.7 + <p>
1.8 + <strong>Included</strong> using XInclude.
1.9 + </p>
1.10 +</body>
1.11 +</html>
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/tests/xinclude_test.py Sat Feb 16 20:11:27 2008 +0000
2.3 @@ -0,0 +1,21 @@
2.4 +#!/usr/bin/env python
2.5 +
2.6 +import libxml2dom
2.7 +
2.8 +s = """<?xml version="1.0"?>
2.9 +<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude">
2.10 +<body>
2.11 + <p>
2.12 + <xi:include href="tests/test_xinclude.xhtml"
2.13 + xpointer="xmlns(html=http://www.w3.org/1999/xhtml)xpointer(/html:html/html:body/html:p/node())"/>
2.14 + </p>
2.15 +</body>
2.16 +</html>
2.17 +"""
2.18 +
2.19 +d = libxml2dom.parseString(s)
2.20 +print "Result of XInclude processing:", d.xinclude()
2.21 +print
2.22 +print d.toString()
2.23 +
2.24 +# vim: tabstop=4 expandtab shiftwidth=4