On Feb 19, 2009, at 9:42 AM, Vincent Massol wrote:
Hi,
One issue to discuss/brainstorm. Transformations are meant to modify the XDOM into a new XDOM. This is for ex the mechanism used for handling macros (MacroTransformation).
Now there are other use cases for Transformations. Examples: * auto-transforming words into wiki links when they're using camel case * automatically creating links on word that have an entry in wikipedia * transform special symbols such as smileys :) into images
We don't want these changes to be persistent in the saved document. They are *temporary* modifications.
However when the wysiwyg runs right now it'll offer the generated XHTML for editing (that generated XHTML contains the transformed XDOM) and thus when we save in the wysiwyg editor the transformations will also be saved, which is a problem.
We've solved it by "cheating" a bit for macros by introducing HTML comments and special handling in the wysiwyg editor. Now I think we need to rethink this and make it more generic for any transformation.
Any idea? I'll try to propose some ideas too...
I think a generalization of the comment strategy + make the transformations read-only in the editor + the ability in the editor to switch on/off transformation rendering + double clicking in transformation (when tx renderng is active) to edit original content. WDYT? Thanks -Vincent http://xwiki.com http://xwiki.org http://massol.net