[Checkins] SVN: Sandbox/Chameleon/src/chameleon/core/te Added tests for XInclude integration.

Malthe Borch mborch at gmail.com
Mon Sep 15 17:33:16 EDT 2008


Log message for revision 91170:
  Added tests for XInclude integration.

Changed:
  U   Sandbox/Chameleon/src/chameleon/core/template.txt
  A   Sandbox/Chameleon/src/chameleon/core/tests/xinclude1.pt
  A   Sandbox/Chameleon/src/chameleon/core/tests/xinclude2.pt

-=-
Modified: Sandbox/Chameleon/src/chameleon/core/template.txt
===================================================================
--- Sandbox/Chameleon/src/chameleon/core/template.txt	2008-09-15 21:32:47 UTC (rev 91169)
+++ Sandbox/Chameleon/src/chameleon/core/template.txt	2008-09-15 21:33:16 UTC (rev 91170)
@@ -31,3 +31,14 @@
   >>> t.filename.startswith(os.sep)
   True
 
+XInclude support
+----------------
+
+  >>> template = TemplateFile(path+"/xinclude1.pt", mock_parser)
+  >>> print template()
+  <div>
+    <div>
+    <span>Hello, world!</span>
+    </div>
+  </div>
+

Added: Sandbox/Chameleon/src/chameleon/core/tests/xinclude1.pt
===================================================================
--- Sandbox/Chameleon/src/chameleon/core/tests/xinclude1.pt	                        (rev 0)
+++ Sandbox/Chameleon/src/chameleon/core/tests/xinclude1.pt	2008-09-15 21:33:16 UTC (rev 91170)
@@ -0,0 +1,4 @@
+<div xmlns="http://www.w3.org/1999/xhtml"
+     xmlns:xi="http://www.w3.org/2001/XInclude">
+  <xi:include href="xinclude${1+1}.pt" />
+</div>

Added: Sandbox/Chameleon/src/chameleon/core/tests/xinclude2.pt
===================================================================
--- Sandbox/Chameleon/src/chameleon/core/tests/xinclude2.pt	                        (rev 0)
+++ Sandbox/Chameleon/src/chameleon/core/tests/xinclude2.pt	2008-09-15 21:33:16 UTC (rev 91170)
@@ -0,0 +1,3 @@
+<div xmlns="http://www.w3.org/1999/xhtml">
+  <span>Hello, world!</span>
+</div>



More information about the Checkins mailing list