]> git.sesse.net Git - xml-template/commitdiff
Add attribute test to the PHP test kit.
authorsgunderson@bigfoot.com <>
Fri, 11 Aug 2006 23:47:01 +0000 (01:47 +0200)
committersgunderson@bigfoot.com <>
Fri, 11 Aug 2006 23:47:01 +0000 (01:47 +0200)
attribute.php [new file with mode: 0644]

diff --git a/attribute.php b/attribute.php
new file mode 100644 (file)
index 0000000..20f33cd
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+require('xml-template.php');
+
+$doc = XML_Template_process_file('clone.xml', array(
+       'color' => 'red',
+       '#things' => array(
+               array( 'li' => 'Raindrops on roses',    'li.class' => 'odd' ),
+               array( 'li' => 'Whiskers on kittens',   'li.class' => 'even' ),
+               array( 'li' => 'Bright copper kettles', 'li.class' => 'odd' ),
+               array( 'li' => 'Warm, woolen mittens',  'li.class' => 'even' )
+       )
+));
+print $doc->dump_mem();
+?>