sgmllib nit

Tres Seaver tseaver at starbase.neosoft.com
Mon Dec 11 01:32:42 CET 2000


In article <y_IY5.2910$O%.457391 at newsc.telia.net>,
Fredrik Lundh <fredrik at effbot.org> wrote:
>
>...so 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.

In DTML,

  <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>?
>
>dtmllib?
>
>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:

  http://dev.zope.org/Wikis/DevSite/Projects/HiperDom/FrontPage

Tres.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver at digicool.com
Digital Creations     "Zope Dealers"       http://www.zope.org



More information about the Python-list mailing list