Location: PHPKode > projects > Open Power Template > tests/Opt/instruction/attribute_2.txt
The test checks the conditional attributes.

>>>>templates/test.tpl
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<opt:root>
<foo>
<opt:attribute str:name="abc" str:value="def" opt:if="true"/>
<opt:attribute str:name="ghi" str:value="jkm" opt:if="false"/>
bar
</foo>
</opt:root>

>>>>expected.txt
OUTPUT

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