RE: RE: RE: PHPTAL - PHP Template Attribute Language
| From: | laurent bedubourg | Date: | Thu, 13 Mar 2003 14:16:49 +0000 |
| Subject: | RE: RE: RE: PHPTAL - PHP Template Attribute Language | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-14242@lists.php.net to get a copy of this message | ||
Le Thu, 13 Mar 2003 21:45:21 +0800, Alan Knowles a écrit :
>>
>>Even as an XML parser, XML Transformer would have been of few interest for
>>PHPTAL as TAL language is based on Attributes and not on Elements.
>>
>>That's the main difference between TAL an any other template systems,
>>
> other than flexy :)
>
Sorry, when i saw {foreach:...} {end:} and other tags, i didn't realize
flexy could use attributes.
> Interesting use of tags - I didnt consider using namespaces for the
> attributes
That's a minimum while playing with XML/XHTML, if you don't put your
attributes in a specific namespace, any simple validator will complain
about unknown attribute... And it so readable !
> - looks like a good idea..
Not mine, thanks ZPT guys an more generaly W3C :)
> - flexy obviously has it's own parser rather than releying on xml
> (as most of the people I give templates to would probably never
> produce good enough xml to run via expat :)
Strange, IMHO expat is too permisive (close unclosed tags whithout
even a warning -- do someone know a way to force strict XML parsing
with expat ? ).
Anyway if you're not sure about what users may send to your template
engine, you can use external tools like html tidy to clean input
and ensure you document is well formed XML.
Good old reminder : "garbage in, garbage out !"
laurent
--
Laurent Bédubourg
laurent.bedubourg@free.fr
PHPTAL status 0.4.0 - beta - testers welcome
PHPTAL home http://laurent.bedubourg.free.fr/