[ZPT] Truncating strings

Ian Bicking ianb at colorstudy.com
Thu Oct 23 11:09:37 EDT 2003


On Thursday, October 23, 2003, at 02:04 AM, Tino Wildenhain wrote:
> The most obvious problem is: ZPT is constantly extended for misuse.
> From what I know, ZPT or the PT part in it was originally meant
> as a proposal for a templating mechanism. And in fact there are
> several implementations yet in other languages (Was it php? was it 
> Java?) (had to google for it, but I remember I read something
> about this)
 >
> While Shanes path prefix proposal would at least have a meaning to
> the other implementations, the constant use of fairly complicated
> expressions in python with all their tal-define, python: prefixed
> expressions and all makes a transition very hard.
> And its completely diametric to what ZPT was about to solve:
> a clean templating language for separation of code and design.
>
> What on earth is wrong with preparing the data before use in ZPT?
> Most of the problems are solveable yet with python scripts.

One ideal is that ZPT can be used for layout, while data is prepared by 
Python scripts.  Truncation *is* layout.  Lot of programming qualifies 
as layout, and there is no limit to how complex layout programming can 
be.

But that's not even what I'm advocating here -- I'm advocating that it 
should be easier to use the code that is defined elsewhere.  Things 
like truncation are required because of the visual context, not the 
intrinsic nature of the data being truncated.  This is a change that 
should be possible to make without changing the Python script that sets 
up the data.

--
Ian Bicking | ianb at colorstudy.com | http://blog.ianbicking.org




More information about the ZPT mailing list