[Zope] Re: Traversal of ZODB
Steve Alexander
steve@cat-box.net
Wed, 05 Jul 2000 22:27:36 +0100
David Trudgett wrote:
>
> 2. You used the "manage_edit()" method, whereas I just assigned to the
> "raw" property. My way seems to work OK, but I'm not sure how yours works:
> I assume it brings up an edit page in the browser for each document?
I just tried running my external method to convert DTML methods and
documents from old-style to new-style. I ran it on the QuickStart tree
of a fresh install of Zope 2.2.x, from CVS.
Interestingly, because I'm calling manage_edit() rather than just
setting the "raw" attribute, I was alerted that my external method
doesn't cover all the possible ways of writing old-style DTML.
Specifically, it stopped with an error on this method:
----end----
convert_dtml: id=dtcTemplate
converting...
----data----
<!--#var standard_html_header-->
<!--#in expr="_.namespace(standard_html_header='',
standard_html_footer='')"-->
<!--#var dtContent-->
<!--#endin-->
<HR>
<!--#var standard_html_footer-->
----newdata----
<dtml-var standard_html_header>
<dtml-in expr="_.namespace(standard_html_header='',
standard_html_footer='')">
<dtml-var dtContent>
<dtml-endin>
<HR>
<dtml-var standard_html_footer>
----end----
The error is "Unexpected tag, for tag <dtml-endin>".
Is the old syntax <!--#end...--> equivalent to <!--#/...--> ?
If so, it isn't documented in the current DTML Reference, and my regular
expression should be changed to accommodate it.
--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net