diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2010-08-08 23:08:41 (GMT) |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2010-08-08 23:08:41 (GMT) |
commit | ba8a98600eddc5e2a87a9148e634ada1a1056495 (patch) | |
tree | 5efc226f5ef208d7d109b62435f4c72bda26c76c /Lib/test | |
parent | 14bd1c3b2e72498ac022161ddddcf9375c92572d (diff) | |
download | cpython-ba8a98600eddc5e2a87a9148e634ada1a1056495.zip cpython-ba8a98600eddc5e2a87a9148e634ada1a1056495.tar.gz cpython-ba8a98600eddc5e2a87a9148e634ada1a1056495.tar.bz2 |
Fix xml.etree.ElementInclude to include the tail of the current node. Issue #6231
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_xml_etree.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py index 4c9f2e0..39997cc 100644 --- a/Lib/test/test_xml_etree.py +++ b/Lib/test/test_xml_etree.py @@ -1277,6 +1277,14 @@ XINCLUDE["C2.xml"] = """\ XINCLUDE["count.txt"] = "324387" +XINCLUDE["C2b.xml"] = """\ +<?xml version='1.0'?> +<document xmlns:xi="http://www.w3.org/2001/XInclude"> + <p>This document has been <em>accessed</em> + <xi:include href="count.txt" parse="text"/> times.</p> +</document> +""" + XINCLUDE["C3.xml"] = """\ <?xml version='1.0'?> <document xmlns:xi="http://www.w3.org/2001/XInclude"> @@ -1352,6 +1360,16 @@ def xinclude(): 324387 times.</p> </document> + Textual inclusion after sibling element (based on modified XInclude C.2) + + >>> document = xinclude_loader("C2b.xml") + >>> ElementInclude.include(document, xinclude_loader) + >>> print(serialize(document)) # C2b + <document> + <p>This document has been <em>accessed</em> + 324387 times.</p> + </document> + Textual inclusion of XML example (XInclude C.3) >>> document = xinclude_loader("C3.xml") |