On 11.01.2008, at 23:30, Rodrigo Moraes wrote:
Today I finally created a demo of PHPTAL working with a PHP DOM
parser, and sent it to a temporary GoogleCode repository. Here's the
that's it. let me know what do you think. :)
I've created a new branch based on your code and added bunch of
Unfortunately it still doesn't work quite right (see tests/run-
PHPTAL's code-generator expects elements and attributes to have
namespace prefixes, which were added as neccessary by the parser. DOM
of course doesn't do this, which causes a lot of bugs and confusion.
Handling of namespaces has to be fixed throughout the code before real
DOM can be supported.
There are issues with DOM itself:
- it doesn't report line numbers for elements, so error messages
(other than parse errors) can't include them. Not very user-friendly :(
- non-validating parser can't support named entities (like ),
but users will expect them to work. Switching to validating parser is
not an option, because it will reject incomplete HTML fragments and
- parser decodes numeric entities and represents them as literal
characters, possibly exposing encoding issues.
PHPTAL mailing list