Is Structured Text Broken in Zope 2.4x ???
Im a Zope newbie who is hoping to more-or-less adopt New Religion from the start. Structured Text is a very attractive feature of Zope, but Ive found some major problems with the Structured Text implementation in Zope 2.4x, and I suspect that many others must have encountered the same issues. My current testing is with Zope 2.4.1 on Windows 2000. I can easily create Structured Text documents (say "stxdoc.stx") in the members areas of www.zope.org and cmf.zope.org that html-render as documented and expected. However those same documents render significantly differently on my local installation of Zope 2.4.1 when called from a dtml document or dtml method: <dtml-var stxdoc.stx fmt="structured-text"> Specifically, hierarchical bulleted and numbered lists (i.e. outlines) render with ugly spacing and tables don't render at all. A possible patch for the spacing problem appears in a comment by datagrok at the bottom of this ZWiki page: http://www.zope.org//Members/jim/StructuredTextWiki/TightParagraphStructured... Additional info on the lack of table rendering appears in this post: http://lists.zope.org/pipermail/zope/2001-September/100485.html Additional Zope 2.4.x Structured Text issues are documented by Ivan Kurmanov in this post: http://lists.zope.org/pipermail/zope/2001-October/100763.html and by Simon Brunning in this post: http://lists.zope.org/pipermail/zope/2001-September/100498.html However, an even much more severe problem lurks in Zope 2.4x. That is that the structured-text() method in Products.PythonScripts.standard is badly, badly broken. In addition to the problems listed above, this method doesnt html-render links. (i.e. "link name:http://mydomain.com does *not* cook into <a href=http://mydomain.com>link name</a> , but rather the input text is copied without any cooking at all!) The method also sometimes performs incorrect double html_quoting. For example, structured text that is indented following a paragraph ending in a double colon (::) , is properly cooked into a <pre></pre> tag in the html output. Unfortunately however, the *content* of the tag is html_quoted *twice* in the output. This is quite bad news, because the structured_text method in PythonScripts is specifically needed for the convenient use of structured text from Zope Page Templates and restricted Python Scripts: Rendering structured text from a Zope Page Template: <span tal:define="global pss modules/Products.PythonScripts.standard"> </span> <span tal:replace="structure python:pss.structured_text(getattr(here,'stxdoc.stx'))"> </span> Rendering structured text from a restricted Script (Python): # Import the standard method "structured_text()" from Products.PythonScripts.standard import structured_text # return a cooked page from a structured text source file print structured_text(getattr(context, "stxdoc.stx")) return printed These bugs appear to be a significant barrier to practical use of Zope Page Templates. Am I missing something? Is the problem simply that StructuredTextNG was used in Zope 2.4x before it was fully debugged? Should Zope just revert to ClassicStructuredText (which was at least stable)? Steve Bain _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Specifically, hierarchical bulleted and numbered lists (i.e. outlines) render with ugly spacing and tables don't render at all. A possible patch for the spacing problem appears in a comment by datagrok at the bottom of this ZWiki page:
http://www.zope.org//Members/jim/StructuredTextWiki/TightParagraphStructured...
StructuredTextNG and classic structured text have different rules for tables, unfortunately. I have no idea why. Here are the rules for NG: http://dev.zope.org/Members/jim/StructuredTextWiki/StructuredTextNGRules Here are the rules for classic: http://dev.zope.org/Members/jim/StructuredTextWiki/ClassicStructuredTextRule... Note that tables aren't documented in classic stx. This is probably no accident. Somebody likely added table support to stx classic without going through the right steps. This is not good, but it's life. The ugly spacing issue I dont know about.
Additional info on the lack of table rendering appears in this post:
http://lists.zope.org/pipermail/zope/2001-September/100485.html
Additional Zope 2.4.x Structured Text issues are documented by Ivan Kurmanov in this post:
http://lists.zope.org/pipermail/zope/2001-October/100763.html
and by Simon Brunning in this post:
http://lists.zope.org/pipermail/zope/2001-September/100498.html
However, an even much more severe problem lurks in Zope 2.4x. That is that the structured-text() method in Products.PythonScripts.standard is badly, badly broken. In addition to the problems listed above, this
<snip>
These bugs appear to be a significant barrier to practical use of Zope Page Templates.
Am I missing something?
Probably not.
Is the problem simply that StructuredTextNG was used in Zope 2.4x before it was fully debugged?
No.
Should Zope just revert to ClassicStructuredText (which was at least stable)?
No. The fact that Page templates' use of StructuredText is broken doesn't necessarily mean that structured text is broken (although it may be). We just need to fix the bugs if any. I'd ask if you could put these issues into the Zope "collector" but its been down for a month. And as soon as I send this mail, this subject is *way* gone from my head. ;-) I suggest sending bugreports to Ken Manheimer, who is working on the new collector: klm@zope.com. -- Chris McDonough Zope Corporation http://www.zope.org http://www.zope.com "Killing hundreds of birds with thousands of stones"
participants (2)
-
Chris McDonough -
Steve Bain