]> git.sesse.net Git - xml-template/blobdiff - python/attribute3.py
Add a new "attribute3" test, for testing undef/NULL/None behaviour (new
[xml-template] / python / attribute3.py
diff --git a/python/attribute3.py b/python/attribute3.py
new file mode 100644 (file)
index 0000000..9c6ffbf
--- /dev/null
@@ -0,0 +1,14 @@
+#! /usr/bin/python
+import xmltemplate
+
+doc = xmltemplate.process_file("../xml/clone.xml", {
+       "color": "blue",
+       "#things": xmltemplate.alternate("li/class", [
+               { "li": "Raindrops on roses" },
+               { "li": "Whiskers on kittens" },
+               None,
+               { "li": "Bright copper kettles" },
+               { "li": "Warm, woolen mittens"},
+       ], "odd", "even")
+});
+print doc.toxml()