use t::TestBase; run_template_process; __DATA__ === using id() function hack --- vars 'id("foo")' => 'xxx' --- template
replace me
--- expected
xxx
=== id() cannot catch xml:id --- vars 'id("foo")' => 'xxx' --- template
foo
--- expected
foo
=== use @xml:id="" instead of id() --- vars '//*[@xml:id="foo"]' => 'xxx' --- template
foo
--- expected
xxx
=== xhtml default xmlns hack --- vars '//span' => 'xxx' --- template replace me --- expected xxx === xhtml with xmlns --- vars '//span' => 'xxx', '//foo:span' => 'zzz', --- template foo foo --- expected xxx zzz === no dtd, no xml declaration --- vars '//foo' => 'xxx' --- template bar --- expected xxx === with dtd --- vars '//span' => 'xxx' --- template foo --- expected xxx === with xml declaration --- vars '//foo' => 'xxx' --- template bar --- expected xxx === repeat block with whitespace 1 --- vars '//div' => sub { [ { 'span' => '001' }, { 'span' => '002' }, { 'span' => '003' }, ] } --- template
bar
--- expected
001
002
003
=== repeat block with whitespace 2 --- vars '//div' => sub { [ { 'span' => '001' }, { 'span' => '002' }, { 'span' => '003' }, ] } --- template
bar
--- expected
001
002
003
=== repeat block with whitespace 3 --- vars '//div' => sub { [ { 'span' => '001' }, { 'span' => '002' }, { 'span' => '003' }, ] } --- template test
bar
--- expected test
001
002
003
=== s/&/&/ for "EntityRef: expecting ';'" --- vars --- template foo & bar & baz --- expected foo & bar & baz