[ZPT] Reason for <script> and <style> exclusion?
Martijn Pieters
mj@zope.com
Tue, 26 Mar 2002 17:09:39 -0500
On Tue, Mar 26, 2002 at 01:17:19PM +0000, Alan Kennedy wrote:
> > By the way, in a <tal:block> (or <tal:whatever> ) you
> > don't need to explicitly put every attribute in the tal
> > namespace, you can just do <tal:block replace="blah">
>
> NB: I have not checked an example to see if this statement
> is true.
>
> But IF this is true, then ZPT is not behaving according to
> the XML namespaces spec, AFAICT.
>
> Attributes DO NOT inherit the namespace of their parent
> elements. Instead, their namespace is defined as their
> parent element.
>
> Therefore, the following are NOT the same
>
> 1. <tal:block xmlns:tal="http://" condition="true"/>
>
> 2. <tal:block xmlns:tal="http://" tal:condition="true"/>
>
> Specifically, the condition attribute in 1 does NOT belong
> to the TAL namespace. Instead, it belongs to a namespace
> which is defined by its parent element (it's hard to find
> the right wording). The condition attribute in 2 belongs to
> the TAL namespace.
>
> Does the current ZPT implementation accept 1, 2, or both?
The parent element of an attribute is the element on which the attribute is
defined; thus, the two examples are the same.
--
Martijn Pieters
| Software Engineer mailto:mj@zope.com
| Zope Corporation http://www.zope.com/
| Creators of Zope http://www.zope.org/
---------------------------------------------