Kevin Cole ha scritto:

>> <input type="text" readonly="$readonlyvar"/>
>>     
>
> Wouldn't it be better to make $readonlyvar equal the entire string
>
>    readonly="readonly"
>   

That would defeat the whole point of having an XML based template engine.

I'm used to that since TAL was introduced in Zope 2, and would never go 
back.

> That way, you're not left with [readonly=""] or
> [readonly="wonkyvalue"] when $readonlyvar is turned "off"...
>   

Just assign None to readonly:


 >>> print kid.Template('<span xmlns:py="http://purl.org/kid/ns#"; 
value="" />')
<?xml version="1.0" encoding="utf-8"?>
<span value="" />
 >>> print kid.Template('<span xmlns:py="http://purl.org/kid/ns#"; 
value="${None}" />')
<?xml version="1.0" encoding="utf-8"?>
<span />




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to