>> What would you suggest to make this easier here? I would not want to 
>> generally enable expression substition for processing instructions.
> 
> Why not?

If we add a mechanism for explicitly controlling this, we can talk about 
setting the default to on. But sometimes you wouldn't want this.
E.g. I can imagine a website with mostly static pages, generated from 
Kid templates, which contain some PHP for dynamic things, because the 
webserver provides only PHP. But PHP instructions contain a lot of $'s.

> Why not make this a PI itself?
> 
> <? kid substitution="on" ?>
> ...
> <? kid substitution="off" ?>

If we do it that way, we could introduce a Template attribute "pragma" 
which is a dictionary of such settings, and use the already existing 
python PI to modify this:

<?python pragma['substitution']=False ?>

We could also allow both, i.e.

<div py:pragma="substitution=False"> ... </div>

would be equivalent to

<div>
<?python _substition_old = pragma['substitution']
pragma['substitution'] = False ?>
...
<?python pragma['substitution'] = _substition_old ?>
</div>

-- Christoph

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
kid-template-discuss mailing list
kid-template-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kid-template-discuss

Reply via email to