Skip to content

Instantly share code, notes, and snippets.

@fujiwara
Created February 9, 2010 11:50
Show Gist options
  • Save fujiwara/299119 to your computer and use it in GitHub Desktop.
Save fujiwara/299119 to your computer and use it in GitHub Desktop.
use strict;
use Template::Semantic;
print Template::Semantic->process(
\*DATA, {
"ul.outer li" => [
{
span => "1",
"ul.inner li" => [
{ li => "1-1" },
{ li => "1-2" },
],
},
{
span => "2",
"ul.inner li" => [
{ li => "2-1" },
{ li => "2-2" },
],
},
],
});
__DATA__
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<ul class="outer">
<li>
<span>XXX</span>
<ul class="inner">
<li>YYY</li>
</ul>
</li>
</ul>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment