[Zope-CMF] portal_text

Benjamin Saller bcsaller@ideasuite.com
14 Nov 2002 14:11:11 -0500


I am working on a text transform tool that came from the desire to break
the transforms out of CMFTypes and into a generic tool. The design seems
similar to what people are talking about with the transform tool. So far
I have Transforms and Chains. 

Transforms are globally registered plugins that get instantiated on a
per site basis. Chains are site specific links of Transforms. Transforms
can specify which mime-types they are able to take as input and what
they output thus we can validate to some extent the logical validity of
a Chain. 

These transforms can be run on arbitrary data by getting the tool and
requesting a tool by name. This is less fun that the way CMFTypes will
change to make this work. There is an optional interface that deals with
transforms as cacheable via mementos handed back from the transform
tool.

The product of a transform is more than a single document/object. Word
documents may have for example subobjects such as images that would need
to be accessible through the object requesting the transform. This works
because you can pass in a dict (or dict like object) that will pick up
these subobjects and the memento handed back by the transform tool would
include the list of subobjects attached as a result of the
transformation. Then when the document is changed the subobjects are
cleaned automatically.

CMFTypes will manage the mementos automatically based on the cache
properties configured for a particular chain.Field data elements
supporting transforms will have their getattr overloaded to delegate key
names to the transform tool so  object/field/asHTML would run the asHTML
chain (or use its cached product if valid) where as object/field would
be the raw object.

-Ben


On Thu, 2002-11-14 at 13:59, Andy McKay wrote:
> Regarding recent reStructuredText emails, is anyone working on portal_text.
> I was thinking again about this the other day in relation to a thread on
> variable expansion with documents, what I was thinking was much simpler than
> Tres' earlier proposal.
> 
> Has it gotten any further than emails or should I get started on a proposal
> / prototype?
> --
>   Andy McKay
>   www.agmweb.ca
> 
> 
> 
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
> 
> See http://collector.zope.org/CMF for bug reports and feature requests
>