[Zope] Augmenting Structured Text (Re: <% ... %>) ?

Boris Borcic zorro@zipzap.ch
Tue, 15 Jun 1999 16:04:05 +0200


Jim Fulton wrote:

> It would be helpful to make hideuosness a little more specific.

It doesn't look like Python.

What I really would love is a Python-inspired,
indented format. An embedding of the facilities
provided by dtml tags in a generally StructuredText-like
format.

Abstracting web content away from HTML, just
as the ZORB abstracts away from HTTP.

This might get defined (in a direction that departs
from the StructuredText philosophy) as a standard bidirectional
mapping between a XML and a "PYML" surface form,
e.g.

<mytag att1=val1 att2=val2> bla1 <othertag> bla2 </othertag></mytag>

would turn into something similar to :

mytag(att1=val1,att2=val2) :
	bla1
	othertag : bla2

Of course, there are a few details to solve (e.g. CDATA)
but (I believe) nothing too terrible. And providing a
generic transform between xml syntax and an unclobbered
python-like surface syntax may well turn out as a selling
point, both for python and zope. While HTML/XML tags
have some of the aura that COBOL had a couple decades
back, I am sure that many resent the verbosity.

Last, assuming a close fit to the actual python syntax,
using the transform in the reverse direction would also
allow using XSL to preprocess python source. Macros for
free ;-)

Regards,

Boris Borcic
--
(10^3+1)/(10+1) = (10-3)(10+3)