I've discovered that the following does not work: <dtml-comment> <dtml-let thisvariable="'some string'"> </dtml-comment> Some text that used to be inside a dtml-let tag . . . <dtml-comment> </dtml-let> </dtml-comment> This is the error I get upon clicking "Change":
Document Template Parse Error
unexpected end tag, for tag </dtml-comment>
What's happening is that *within* the dtml-comment tags, Zope is keeping track of the dtml-let tag, and won't let me continue until I close the dtml-let *inside* of the comment. I would expect that anything inside a <dtml-comment> would be ignored by Zope . . . Is this a bug, or is this an intentional behaviour I don't understand? Thanks, CJ
On Mon, Feb 07, 2000 at 05:35:52PM -0600, Christopher J. Kucera wrote:
I've discovered that the following does not work:
<dtml-comment> <dtml-let thisvariable="'some string'"> </dtml-comment> Some text that used to be inside a dtml-let tag . . . <dtml-comment> </dtml-let> </dtml-comment>
This is the error I get upon clicking "Change":
Document Template Parse Error
unexpected end tag, for tag </dtml-comment>
What's happening is that *within* the dtml-comment tags, Zope is keeping track of the dtml-let tag, and won't let me continue until I close the dtml-let *inside* of the comment.
I would expect that anything inside a <dtml-comment> would be ignored by Zope . . . Is this a bug, or is this an intentional behaviour I don't understand?
Zope by default runs your document through some sort of XML validating parser that wants tags to open and close in correct nested order. A workaround is to mangle the name of the tag, i.e.: <dtml-let foo="bar"> <dtml-var foo> is the value of foo </dtml-let> becomes <dtl-let foo="bar"> <dtml-var foo> is the value of foo </dtl-let> -- Stephen Pitts smpitts@midsouth.rr.com webmaster - http://www.mschess.org
Stephen Pitts wrote:
Zope by default runs your document through some sort of XML validating parser that wants tags to open and close in correct nested order. A workaround is to mangle the name of the tag, i.e.:
Yeah, or another workaround would be to just close the tags inside the comment, but it seems to me that the Zope XML parser should just completely ignore what's inside a comment. I shouldn't have to go through and modify code inside a dtml-comment just so I can try out a completely different dtml-let (or the like) . . . Of course, then I suppose that nested comments wouldn't work, either. Still, I'd like to see the dtml-comment tag behave more comment-like and less "just another tag"-like. Just my $0.02, -CJ
participants (2)
-
Christopher J. Kucera -
Stephen Pitts