[Zope] Re: [ZPT] Is PageTemplates doing xhtml conversion? Should it?

John Morton jwm@plain.co.nz
Thu, 30 Aug 2001 11:20:47 +1200


On Thursday 30 August 2001 09:33, Geir B=E6kholt wrote:
>  Hello John,
>
>  I have some related issues, which i am kind of puzzled by, as the
>  original spec of ZPT was to go fro XHTML altogether IIRC:
>
>  Is is not currently possible to create what are single attributes in
>  "old-style-html" (selected, checked etc..)  as correct XHTML
>  (selected=3D"selected") with tal:attributes..

I noticed that. It's rather weird considering all of the browsers I've te=
sted=20
seem to deal with fully formed attributes without a problem. Anyone know =
of=20
any counter examples?

>  if it also breaks onchange and its likes , i think we need to find a
>  way to coerce it into using the XML-parser for XHTML, but still serve
>  the pages with content-type text/html, to keep it working in most
>  browsers.

It doesn't really break 'onchange' and the like, as attributes are suppos=
ed=20
to be in lowercase, and browsers don't seem to be fussy about case for=20
attributes. But if you wrote the attribute as 'onChange' and expect=20
tal:attributes to replace 'onChange' you're in for a suprize.=20

>  We have almost completely ditched DTML in favor of Page Templates, but
>  as long as it is not possible to create proper XHTML with them , i
>  consider them partially broken.
>
>  hmm.. i actually think XHTML should be the default these days, with a
>  "pre-html4.01-mode" for those going old-style....

Which I why I like the 'choose your own munging mode' strategy. Anyone kn=
ow=20
of an xhtml conversion library for python?

John