File: test_namespaces.kid

package info (click to toggle)
kid 0.6.3-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 588 kB
  • ctags: 588
  • sloc: python: 2,447; makefile: 5; xml: 4
file content (28 lines) | stat: -rw-r--r-- 855 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?xml version='1.0' encoding='utf-8'?>
<?python

from elementtree.ElementTree import XML
include_common = "<x xmlns='urn:test2' xmlns:t='urn:test2'><foo t:x='y'>bar</foo></x>"

?>
<testdoc xmlns:py="http://purl.org/kid/ns#"
         xmlns:xhtml="http://www.w3.org/1999/xhtml"
         xmlns:test="urn:test"
         lang="en" xml:lang="en">

  <test>
    <attempt><test:elem x="10" test:x="20">some text</test:elem></attempt>
    <expect><test:elem x="10" test:x="20">some text</test:elem></expect>
  </test>

  <test>
    <attempt><elem xmlns="urn:test" x="10" test:x="20">some text</elem></attempt>
    <expect><test:elem x="10" test:x="20">some text</test:elem></expect>
  </test>

  <test>
    <attempt>${XML(include_common)}</attempt>
    <expect><x xmlns="urn:test2"><foo ns1:x='y' xmlns:ns1='urn:test2'>bar</foo></x></expect>
  </test>

</testdoc>