]> git.sesse.net Git - xml-template/blobdiff - doc/intro.txt
Change the syntax for attributes from tag.attribute to tag/attribute; we
[xml-template] / doc / intro.txt
index f94cef771dbe4e6b5e56e2fcf66a2a414a168d64..e9807e56f1526629215771b4499acef6c2287d2b 100644 (file)
@@ -190,10 +190,10 @@ Code (attribute.pl):
   my $doc = XML::Template::process_file('../xml/clone.xml', {
        'color' => 'red',
        '#things' => [
-               { 'li' => 'Raindrops on roses',    'li.class' => 'odd' },
-               { 'li' => 'Whiskers on kittens',   'li.class' => 'even' },
-               { 'li' => 'Bright copper kettles', 'li.class' => 'odd' },
-               { 'li' => 'Warm, woolen mittens',  'li.class' => 'even' }
+               { 'li' => 'Raindrops on roses',    'li/class' => 'odd' },
+               { 'li' => 'Whiskers on kittens',   'li/class' => 'even' },
+               { 'li' => 'Bright copper kettles', 'li/class' => 'odd' },
+               { 'li' => 'Warm, woolen mittens',  'li/class' => 'even' }
        ]
   });
   print $doc->toString;