Location: PHPKode > projects > Open Power Template > tests/Opt/instruction/attribute_7.txt
The test checks the empty "ns" attribute.

>>>>templates/test.tpl
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<opt:root>
<foo>
<opt:attribute ns="$ns" name="$name" str:value="def" />
bar
</foo>
</opt:root>

>>>>data.php
$view->ns = null;
$view->name = 'abc';

>>>>expected.txt
OUTPUT

>>>>result.txt
<foo abc="def">
bar
</foo>
Return current item: Open Power Template