[PHPTAL] XMLNS & DTD

Kornel Lesinski kornel at aardvarkmedia.co.uk
Wed Apr 23 13:48:50 CEST 2008


On Wed, 23 Apr 2008 08:28:30 +0100, Guillaume Lecanu <Guillaume at lya.fr>  
wrote:

> When I try to check my template page in W3C validator, this report some
> errors because of xmlns like metal, tal and i18n.
>
> There is surely a xmlns:metal, xmlns:tal & xmlns:i18n attributes to put
> in the <html> tag but I don't find the good URL of the DTD.
>
> Can you give me the correct URL of DTD's ?

For PHPTAL these prefixes are "magic" and you don't have to declare them  
in templates, so unless you're using other XML tools on template files,  
don't put xmlns:tal, etc. at all.

If you want to have declarations and keep W3C Validator happy, the DTD for  
it would look something like this:

<!ENTITY % XHTML10Strict PUBLIC
    "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
%XHTML10Strict;

<!ATTLIST html
   xmlns:tal       %URI;          #FIXED  
'http://xml.zope.org/namespaces/tal'
   xmlns:metal     %URI;          #FIXED  
'http://xml.zope.org/namespaces/metal'
   xmlns:i18n      %URI;          #FIXED  
'http://xml.zope.org/namespaces/i18n'
   >

-- 
regards, Kornel



More information about the PHPTAL mailing list