Here's a useful hack:
Grab the
Radeox sources and make a class like this:
package org.radeox.example;import org.radeox.engine.context.RenderContext;
import org.radeox.engine.context.BaseRenderContext;
import org.radeox.EngineManager;/**
* Created by IntelliJ IDEA.
* User: mdubinko
* Date: Feb 22, 2003
* Time: 5:24:13 PM
* To change this template use Options | File Templates.
*/
public class Renderer {
public Renderer() { } // needed for recognition as extension class? public static String render(String arg) { if (arg == null)
arg = "whatever sample snip you want here"; RenderContext context = new BaseRenderContext();
return (EngineManager.getInstance().render(arg, context));
}
}Hmm, ought to make RenderContext static.. Anyway, with a recompiled radeox.jar in the classpath, Java XSLT engines like Saxon can then do this:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:radeox="http://snipsnap.org/org.radeox.example.Renderer">
…
<xsl:template match="content">
<content><xsl:value-of select="radeox:render(.)" disable-output-escaping="yes"/></content>
</xsl:template>
…
</xsl:stylesheet>
I hereby contribute the content of this snip to the public domain, for anyone to use for any purpose. -m