sgmllib nit

Tres Seaver tseaver at
Mon Dec 11 01:32:42 CET 2000

In article <y_IY5.2910$O%.457391 at>,
Fredrik Lundh <fredrik at> wrote:
> if DTML expects
>    <dtml-var standard_html_header>
>to mean
>    <dtml-var standard_html_header=''>
>instead of
>    <dtml-var standard_html_header='standard_html_header'>
>it's neither SGML, HTML, nor XML.


  <dtml-var standard_html_header>

is actually a shortcut for

  <dtml-var name="standard_html_header">

>> Which parser should one use to analyse dtml which can contain tags like
>> <dtml-var standard_html_header>?
>I suggest asking the Zope folks if/why they're using an embraced
>and extended syntax, and what parser they recommend...

This version of DTML syntax was intended to be friendly to
"HTML tools", which can be taught to recognize the handful of
DTML tags.  The "entity-reference" DTML syntax allows cleaning
up some parsing issues:  instead of

  <a href="<dtml-var absolute_url>">

one can type

  <a href="&dtml-absolute_url;">

Note that we are as well-aware as anyone of the problematic nature
of DTML, which succeeds at its main goal (easing the generation of
HTML against an object-space), while imposing unfortanate burdens
on those who would integrate DTML with other tools.  We are working
directly with the folks from HiperLogica on their proposal to create
fully-XHTML-compliant templates as an eventual replacement for DTML:


Tres Seaver                                tseaver at
Digital Creations     "Zope Dealers"

More information about the Python-list mailing list