[Zope3-dev] Axe DTML Document

Florent Guillaume fg@nuxeo.com
18 Dec 2001 18:07:12 GMT


> > We *nearly* did this for Zope 2.5.  We wanted a Document Document, not a
> > DTML Document.  A Document that acted more like CMF Document: got its
> > formatting imposed on it (rather than requiring includes at the top and
> > bottom), focused on content rather than programming, etc.
> >
> > When we realized what we were getting into, we deferred.  Namely, we
> > didn't want to invent a temporary Document to compete with CMF Document
> > when it was time to do a Zope3 Document.
> >
> > So now it's time for Zope3.  We need a Document.  We need someone to
> > make a Document.  I nominate Casey. :^)
> >
> > --Paul
> 
> Hey, cool a project for Zope3!
> 
> >From experience how much of the CMF Document is applicable, or how close is 
> it? Is this something for the fishbowl first?

One question you have to ask yourself is, what kind of content do you
want ? Pure preformatted text ? Structured text ? HTML ? XML ? PDF ?
Microsoft Word ? Where do you stop... :-)

IMHO CMF Document is already too complex for its own good. It tries to
parse headers in structured-text, which ends up decapitating document,
thus baffling unsuspecting users (I hotpatched away this munging). When
doing HTML, it parses metadata to update properties, even the title. At
the very least this behaviour should be controllable by the site
manager.

What CMF Document showed us is that, while it's good to have two options
for the kind of formatting you want (stx or html), they should be much
more distinct code-wise, with the ability to add new components so that
the Document can easily be extended to other types. Basic needed methods
are still CookedBody() and data() (or document_source() ?). We also
envision, for NuxDocument, a way for the user to upload new content but
not have it cooked, leaving instead a "HTML preview not available"-like
message. This is useful when doing MSWord conversion with imperfect
tools like wvWare under Unix.

But then this really isn't a Document type anymore, but more like a
dispatcher to other types. There are links with the Zope3 equivalent of
content_type_registry too...


Just a few thoughts.


Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 10  http://nuxeo.com  mailto:fg@nuxeo.com