[Zope] - XML-style DTML code

Christopher G. Petrilli petrilli@amber.org
Fri, 29 Jan 1999 15:50:16 -0500


On Fri, Jan 29, 1999 at 02:14:04PM -0600, Paul Prescod wrote:
> I didn't mean to step on your toes nor say anything for or against any
> proposal that you may have made regarding this issue. I've seen only half
> of this conversation and out-of-order. If the question is "how do I make
> DTML XML compliant" my answer is "use XSL-style templates." By the way you
> disparge XML in your message, I presume that XML compliance is *not* your
> current problem, but that leaves me rather confused about the subject
> line.

Since you used to be on the Zope list, I had assumed you caught the
whole conversation... it goes something like this.

Someone asks why there isn't some neat GUI.

Someone proposes Netscape/et al.

Someone complains that using comments for DTML (<!--#var -->) makes it
nearly impossible to use said tools.

I do a tiny bit of looking, and propsose to modify the syntax to look
more like XML, and also like PHP (which also uses the PI construct),
never proposing that it's XML, just "XML-like"... also this will perhaps
start to get people aclimated to typing <?ztml ?> rather than the
existing one.

Anyway, somehow that got copied to the XML list, trying to see if it was
wellformed... it's not, nor valid, I know that, understood it from the
start.  It wasn't my intention to make well-formed nor valid XML.

well, anyway, someone proposed an option that would translate to
well-formed XML... (I forget the name, now, damned emailer), which comes
to something like this, which si what I'm looking at now:

	<?ztml store("var name")?>

Note that this is used for non-immediate insertion into the data-stream,
and perhaps more accurately fits the use intended for PI elements. 
That shoves it into a "register" which can be later accessed using:

	&ztml;

As an identity construct.  This eeems to meet all the concerns except
that it isn't XSL... but it's not meant ot be XSL, just an
ultra-lightweight way to get 99% of the job done.  You can then use it
so:

	<A HREF="&ztml;/FolderishTHingHere">

which, according to what I read in the XML spec is totally acceptable
:-)  Now I'd like to be able to define a bunch of these things at the
start of a template, but that's just too complex, I'm not sure that I
like the results of &ztml0; &ztml1; etc., which create the effective
result of single letter variables ... evil evil evil.

Mkae sense now?  Plus I needed to write this down for my own edification
and education, so I understand what it is I'm trying to do :-)

Chris
-- 
| Christopher Petrilli
| petrilli@amber.org