[PHPTAL] Whitespace preservation, revisited :)
Werner
lists at mollentze.co.za
Tue Jul 31 11:53:38 CEST 2007
Hi!
I have actually changed my point of view on this - I have been telling
other PHPTAL users for quite some time to use "the right tool for the
job" (e.g. HTMLTidy) when it comes to pretty-printing (e.g. indented
HTML/XML) output from PHPTAL templates.
Recently I have also run into some stumbling blocks in this regard. E.g.
if you take great case in your markup, you don't want to run it though
yet another parser just to have nicer markup output. Even worse, Tidy
cannot *just* indent and beautify your code - it insists on "fixing" the
sources, sometimes breaking perfectly tuned XHTML if it contains things
like Google analytics code and the like. Then there's also the system
overhead of parsing the markup (yet again), since PHPTAL does it anyways
to start with.
So, being a great "fan" of PHPTAL I'm posing the question that has been
asked before:
Is there a possibility of us seeing whitespace preservation from PHPTAL
any time soon?
I have also read on the web site about the possibility of the whole
PHPTAL codebase being re-written if time allows. Is there any truth in
that? (Just for interest sake).
Are there any other low-overhead markup beautifiers out there that are
any good (not stuff like php's DOM functions, which actually are quite
slow).
Any replies on this 'ol subject will be much welcomed.
Thank you all,
Werner
More information about the PHPTAL
mailing list