[PHPTAL] XMLNS & DTD
Guillaume Lecanu
guillaume.lecanu at noovea.fr
Wed Apr 23 16:21:30 CEST 2008
Le mercredi 23 avril 2008 à 12:48 +0100, Kornel Lesinski a écrit :
> 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.
Yes, I know there is a difference between the templates (with the tal
attributes) and the generated
output (without tal attributes).
The output will be XHTML valid, I know.
But, when I make a XHTML page, I'm using the W3 validator a lots of time
to check my new additions
of XHTML. So, if there is the PHPTAL attributes, the validator will
show me a lots of errors, and it's
more complicated to see my own XHTML error...
Do you see what I mean ?
But there doesn't seems to have any tricks to skip theses errors...
>
> 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'
> >
>
Humm you mean I could adapt the xhtml1-strict.dtd to accepts theses
xmlns, and
to change the DTD url of the DOCTYPE ?
It's a good idea if it's possible to replace the DOCTYPE by the good one
when the page
is generated ?
--
noovea
Lecanu Guillaume
Directeur Général
Tél. : 01.76.23.00.12
GSM : 06.27.46.36.04
Fax : 03.20.32.37.48
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.motion-twin.com/pipermail/phptal/attachments/20080423/3c520774/attachment.htm
More information about the PHPTAL
mailing list