<!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:tmpl="http://template.sesse.net/" xml:lang="en">
+ <html xmlns="http://www.w3.org/1999/xhtml" xmlns:t="http://template.sesse.net/" xml:lang="en">
<head>
<title>Cloning test</title>
</head>
<body>
- <p>My favourite color is <tmpl:color />; I like that very much.
+ <p>My favourite color is <t:color />; I like that very much.
All my favourite things:</p>
- <ul tmpl:id="things">
+ <ul t:id="things">
<li />
</ul>
</body>
</html>
This isn't much harder than the example above; we've done a simple replacement
-of the contents of <tmpl:color> to "blue" (and after that just removed the tag;
+of the contents of <t:color> to "blue" (and after that just removed the tag;
any tag you use in the templating namespace will automatically get stripped
away), and then cloned the contents of our "things" bullet list. Note that
XML::Template automatically recurses after the cloning, since you probably
<!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:tmpl="http://template.sesse.net/" xml:lang="en">
+ <html xmlns="http://www.w3.org/1999/xhtml" xmlns:t="http://template.sesse.net/" xml:lang="en">
<head>
<title>Cloning test</title>
</head>
<body>
- <p>My favourite color is <tmpl:color />; I like that very much.
- All my favourite things:</p>
- <ul tmpl:id="things">
+ <p>My favourite color is <t:color />; I like that very much.
+ All my favourite things:</p>
+ <ul t:id="things">
<li />
</ul>
</body>