--- /dev/null
+#! /usr/bin/perl
+use XML::Template;
+
+my $doc = XML::Template::process_file('../xml/structure.xml', {
+ '#outer' => [
+ { '#inner' => 'One' },
+ { '#inner' => 'Two' },
+ { '#inner' => 'Three' },
+ ]
+});
+print $doc->toString;
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+ <head>
+ <title/>
+ </head>
+ <body>
+ <div>
+ <div>
+ <div>One</div>
+ </div>
+
+ <div>
+ <div>Two</div>
+ </div>
+
+ <div>
+ <div>Three</div>
+ </div>
+ </div>
+ </body>
+</html>
#! /bin/sh
if [ -z "$TESTS" ]; then
- TESTS="passthru simple clone include attribute attribute2 attribute3 attribute-empty namespace namespace2"
+ TESTS="passthru simple clone include attribute attribute2 attribute3 attribute-empty namespace namespace2 structure"
fi
if [ -z "$LANGUAGES" ]; then
LANGUAGES="perl perl-sax php python ruby"
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<!DOCTYPE
+ html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:t="http://template.sesse.net/" xml:lang="en">
+ <head>
+ <title />
+ </head>
+ <body>
+ <div t:id="outer">
+ <div>
+ <div t:id="inner">
+ This is a test of how well cloning and substitution deals with multiple elements with the
+ same tag inside each other. It shouldn't get confused, as the names don't
+ really matter, but then again, it might.
+ </div>
+ </div>
+ </div>
+ </body>
+</html>