Re: [Zope-dev] ZPT and strict namespace mapping

2008-08-30 Thread Dieter Maurer
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
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZPT and strict namespace mapping

2008-08-30 Thread Malthe Borch
2008/8/30 Dieter Maurer [EMAIL PROTECTED]:
 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
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZPT and strict namespace mapping

2008-08-30 Thread Andreas Jung



--On 30. August 2008 07:39:05 +0200 Wichert Akkerman [EMAIL PROTECTED] 
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

pgpSeMGlHPHyr.pgp
Description: PGP signature
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZPT and strict namespace mapping

2008-08-29 Thread Andreas Jung



--On 29. August 2008 12:31:21 +0200 Malthe Borch [EMAIL PROTECTED] 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

pgpwl01UqfQrT.pgp
Description: PGP signature
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZPT and strict namespace mapping

2008-08-29 Thread Malthe Borch
2008/8/29 Andreas Jung [EMAIL PROTECTED]:


 --On 29. August 2008 12:31:21 +0200 Malthe Borch [EMAIL PROTECTED] 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
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZPT and strict namespace mapping

2008-08-29 Thread Andreas Jung



--On 29. August 2008 13:20:38 +0200 Malthe Borch [EMAIL PROTECTED] wrote:


2008/8/29 Andreas Jung [EMAIL PROTECTED]:



--On 29. August 2008 12:31:21 +0200 Malthe Borch [EMAIL PROTECTED]
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

pgpCwfAxhpKkh.pgp
Description: PGP signature
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZPT and strict namespace mapping

2008-08-29 Thread Marius Gedminas
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.


signature.asc
Description: Digital signature
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZPT and strict namespace mapping

2008-08-29 Thread Wichert Akkerman
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 [EMAIL PROTECTED]It is simple to make things.
http://www.wiggy.net/   It is hard to make things simple.
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )