4 XWiki Transformation - Reference Documentation
Authors: Masatoshi Hayashi
Version: 1.0-RC2
4 XWiki Transformation
XWiki Transfromation
modefies some XDOM
(AST representing the input) to generate modified XDOM
.See also XWiki Rendering Architecture for more details about XWiki Transformation.In this Grails XWiki Rendering Plugin, xwikiRenderer and xwikiStreamRenderer services can take some XWiki Transformations.Example
class TestTransformation extends AbstractTransformation { def parameter public TestTransformation(parameter){ this.parameter = parameter } public void transform( Block block, TransformationContext transformationContext) throws TransformationException { block.addChild(new RawBlock(parameter, Syntax.XHTML_1_0)); } }
def transformation = new TestTransformation("test parameter") def output = xwikiRenderer.render("** Source Text **", transformation)