I need a template-engine for a project, that parses sgml-content and converts user-defined tags like <ext:grid />
. In nearly every case, the input-content is valid. A common problem is the link-generator. The link-generator produces &
instead of &
which is the main cause of my parsing-problems. I cant change this behavior, because the output of that generator is used in many other situations where the links are required to have an &
instead of &
.
I have tried DOMDocument, SimpleXML and xml_parser. They all exit on entity problems. Any ideas? All I want is, that this "problem" gets simply ignored by the parser.
Where is a test-template:
<template xmlns:grid="templates/grid" xmlns:std="templates/std">
<std:header text="Overview" type="h1" />
<grid:base width="100%">
<grid:columns>
<grid:body>
<?php foreach($products as $product): /* @var $product Dfm_Shop_Model_Product */ ?>
<grid:row selectable="1">
<grid:cell>
<div><?php echo $this->esc($product->getTitle()) ?></div>
</grid:cell>
<grid:cell>
<a href="<?php env()->http()->to(array('controller' => 'Dfm_Shop_Controller_Products', 'method' => 'showEdit')) ?>"><std:img src="icons/pencil.png" hint="Edit" /></a>
</grid:cell>
</grid:row>
<?php endforeach ?>
</grid:body>
</grid:base>
</template>