[Zope3-dev] Re: idea: attr:foo addition to tal
Philipp von Weitershausen
philipp at weitershausen.de
Fri Jul 23 07:32:26 EDT 2004
Tonico Strasser wrote:
> Steve Alexander wrote:
>
>> I was writing yet another tal:attributes expression, when I had the
>> following idea.
>>
>> How about if there were an 'attr' namespace that the tales interpreter
>> understands that replaces attributes?
>>
>> So, instead of
>>
>> <a tal:attributes="href item/url" tal:content="item/description" />
>>
>> we get
>>
>> <a attr:href="item/url" tal:content="item/description" />
>
>
> -1 for me.
>
> <a attr:xml:lang="here/lang"/>
Using namespaces in XHTML is a rare case; however, we don't want to
limit Page Templates to non-namespaced XML templates. But since it's a
rare case, it wouldn't hurt falling back to tal:attributes there.
Or, we could have a different separate, e.g.:
<a attr:xml#lang="here/lang" />
Then again, I would have to read the spec to see if # or similar are
allowed in attribute names...
> Would this be possible? If yes, is it still valid XML?
I doubt both.
Philipp
More information about the Zope3-dev
mailing list