[opencms-dev] Custom XML transformations upon save?

John Weible jweible at uiuc.edu
Mon Mar 17 22:08:42 CET 2008


Hi all.

We use custom XML file types in OpenCms.  Within those, we store chunks 
of content in some elements using the "OpenCmsHtml" data type.

We need some custom transformations to occur to the XML inside some of 
those elements before the content is saved to the VFS, but I haven't 
figured out the correct approach. 

It looks like I'm supposed to make use of 
org.opencms.xml.content.I_CmsXmlContentHandler.prepareForWrite() but I 
haven't found any examples to show how this is done.

The only example code I've found that is close (at 
http://opencms-wiki.org/Custom_XML_Content_Validation) just shows custom 
validation & error handling, not transformations.

Has anyone successfully done this sort of thing?

Many thanks.

-- 
John Weible
University Libraries, University of Illinois at Urbana-Champaign





More information about the opencms-dev mailing list