Trying to get a feeling here on whether we want to require proper XML namespace definition (current z3c.pt behavior) or implicitly fallback to the standard mappings (current zope.pagetemplate behavior). \malthe
--On 29. August 2008 12:31:21 +0200 Malthe Borch <mborch@gmail.com> wrote:
Trying to get a feeling here on whether we want to require proper XML namespace definition (current z3c.pt behavior) or implicitly fallback to the standard mappings (current zope.pagetemplate behavior).
Can you elaborate this statement? Andreas
2008/8/29 Andreas Jung <lists@zopyx.com>:
--On 29. August 2008 12:31:21 +0200 Malthe Borch <mborch@gmail.com> wrote:
Trying to get a feeling here on whether we want to require proper XML namespace definition (current z3c.pt behavior) or implicitly fallback to the standard mappings (current zope.pagetemplate behavior).
Can you elaborate this statement?
Right, so this is basically a question of whether the following template is legal or not: <div tal:replace="string:hello world!" /> In ZPT it would be, because it automatically assumes this namespace declaration: xmlns="http://www.w3.org/1999/xhtml" xmlns:tal="http://xml.zope. org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal" . z3c.pt otoh, does not make such an assumption. \malthe
--On 29. August 2008 13:20:38 +0200 Malthe Borch <mborch@gmail.com> wrote:
2008/8/29 Andreas Jung <lists@zopyx.com>:
--On 29. August 2008 12:31:21 +0200 Malthe Borch <mborch@gmail.com> wrote:
Trying to get a feeling here on whether we want to require proper XML namespace definition (current z3c.pt behavior) or implicitly fallback to the standard mappings (current zope.pagetemplate behavior).
Can you elaborate this statement?
Right, so this is basically a question of whether the following template is legal or not:
<div tal:replace="string:hello world!" />
In ZPT it would be, because it automatically assumes this namespace declaration:
xmlns="http://www.w3.org/1999/xhtml" xmlns:tal="http://xml.zope. org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal" .
z3c.pt otoh, does not make such an assumption.
For convenience: z3c.pt should/could make such an assumption :-) Andreas
Malthe Borch wrote at 2008-8-29 13:20 +0200:
... Right, so this is basically a question of whether the following template is legal or not:
<div tal:replace="string:hello world!" />
In ZPT it would be, because it automatically assumes this namespace declaration:
xmlns="http://www.w3.org/1999/xhtml" xmlns:tal="http://xml.zope. org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal" .
This is correct for HTML PageTemplates; XML PageTemplates, too, require the namespace declarations -- at least this has been the case for the former Zope 2 version of "PageTemplate" (I do not yet know most details about the newer Zope 3 "PageTemplate"). -- Dieter
2008/8/30 Dieter Maurer <dieter@handshake.de>:
This is correct for HTML PageTemplates; XML PageTemplates, too, require the namespace declarations -- at least this has been the case for the former Zope 2 version of "PageTemplate" (I do not yet know most details about the newer Zope 3 "PageTemplate").
That makes sense since you're not even allows to use foreign namespaces in XHTML. We I don't think we have a good way to make this distinction besides passing arguments to the constructor. \malthe
On Fri, Aug 29, 2008 at 12:31:21PM +0200, Malthe Borch wrote:
Trying to get a feeling here on whether we want to require proper XML namespace definition (current z3c.pt behavior) or implicitly fallback to the standard mappings (current zope.pagetemplate behavior).
Requiring explicit XML namespace declarations for TAL and TALES is a big cost for no obvious benefit, except maybe for making some obsessive-compulsive XML people slightly happier. It's not the Python way, I believe. We don't have 'public static void main', why should we have mandatory XML namespaces in our page templates? Marius Gedminas -- Some people around here wouldn't recognize subtlety if it hit them on the head.
Previously Malthe Borch wrote:
Trying to get a feeling here on whether we want to require proper XML namespace definition (current z3c.pt behavior) or implicitly fallback to the standard mappings (current zope.pagetemplate behavior).
+1 for requiring proper XML namespace. Tools like xmllint which are incredibly practical to validate your templates require this as well. Wichert. -- Wichert Akkerman <wichert@wiggy.net> It is simple to make things. http://www.wiggy.net/ It is hard to make things simple.
--On 30. August 2008 07:39:05 +0200 Wichert Akkerman <wichert@wiggy.net> wrote:
Previously Malthe Borch wrote:
Trying to get a feeling here on whether we want to require proper XML namespace definition (current z3c.pt behavior) or implicitly fallback to the standard mappings (current zope.pagetemplate behavior).
+1 for requiring proper XML namespace. Tools like xmllint which are incredibly practical to validate your templates require this as well.
-1 for having to write boilerplate code. Andreas
participants (5)
-
Andreas Jung -
Dieter Maurer -
Malthe Borch -
Marius Gedminas -
Wichert Akkerman