[PHPTAL] bugs

Laurent Bedubourg lbedubourg at motion-twin.com
Fri May 12 11:11:51 CEST 2006


On Wed, 2006-05-10 at 15:51 +0200, olympic at dino-online.de wrote:
> Hi,
> 
> there are some serious problems when using php tal with non html
> documents .
> 
> A long time ago i asked for namespace support, that is i was
> trying to process xml-fo.
> 
> Phptal doesn't honor my namespace and interprets the fo:block-element
> as a tal:block - which leads to:
> 
> Whenever my document contains <fo:block foo..> phptal removes it...
> (fo:block is the major element for xml-fo :))

Hi,

I just corrected the fo:block problem in the latest SVN trunk.

I also slightly modified the XML parser so it will accept :

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
 [
 <!ENTITY include SYSTEM "/extras/scn.ent">
 <!ENTITY frac14 "&#188;">
  ]>
<html>
</html>

> Any reason why you don't use a standard parser ? libxml2 can even
parse 
> non wellformed documents (HTML) and has support for namespaces,
inline 
> DTDs (phptal can't parse these..), and ...

At the time PHPTAL for PHP5 was written, the libxml2 wrapper suffered
from many little bugs which made it unusable for the project.

Anyway, I am not sure to want the PHPTAL parser to parse non well formed
documents :)

> Any plans to use a standard parser some day?

Maybe in a future release. I don't really have the time to play with
libxml2 and ensure the new parser pass all test units. I am not sure
that libxml2 is shipped with every PHP binaries too.

> But I would like to use it without patching every new version

Your reports were sent while i was really busy and i forgot to write
them down to my to do list... sorry for the inconvenience...

Best regards
Laurent





More information about the PHPTAL mailing list