[Zope] DTML reformulated as XML (was RE: [Zope] <% ... %> ?)

Jim Fulton jim@digicool.com
Tue, 15 Jun 1999 08:44:24 -0400


Tony McDonald wrote:
> 
(snip)
> >
> > Here's one thing in DTML that would be awfully obscure in XML:
> >
> > <a href="<!--#var BASE1-->">
> >
> > That is, putting a tag inside an attribute.  Chris Petrilli and Jim
> > talked about this today, perhaps as as entity references.
> >
> 
> That'd be ok for the Zope variables that take no arguments (BASEn, URLn
> etc.) ie map BASE1 to &BASE1; but what about Zope variables that take
> attributes, eg ZopeTime fmt=whatever (for example, you'd use this awful
> construct to create a URL that had subparts such as /990612/)
> 
> A very hairy problem.

Nah.

  <dtml-let yy="ZopeTime().yy()"  mm="ZopeTime().mm()"  dd="ZopeTime().dd()">
    <a href="&dtml-URL1;/&dtml-yy;&dtml-mm;&dtml-dd;/">...</a>
  </dtml-let> 

 
(snip)
> > For instance, instead of saying <!--#var standard_html_header-->, which
> > means insert a subdocument, why not use the XLink syntax from XML?
> >
> 
> Would that not imply Zope parsing all elements in a page/object looking for
> attributes called xml:link?

Yes, but in an XML variant of Zope, this would merely involve walking an 
object tree.

> Isn't this a largeish overhead?

Not really.

Jim

--
Jim Fulton           mailto:jim@digicool.com   Python Powered!        
Technical Director   (888) 344-4332            http://www.python.org  
Digital Creations    http://www.digicool.com   http://www.zope.org    

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.