org.alfresco.web.forms
Class XSLTRenderingEngine

java.lang.Object
  extended by org.alfresco.web.forms.XSLTRenderingEngine
All Implemented Interfaces:
java.io.Serializable, RenderingEngine
Direct Known Subclasses:
XSLFORenderingEngine

public class XSLTRenderingEngine
extends java.lang.Object
implements RenderingEngine

A rendering engine which uses xsl templates to render renditions of form instance data.

See Also:
Serialized Form

Nested Class Summary
static class XSLTRenderingEngine.ProcessorMethodInvoker
           
 
Nested classes/interfaces inherited from interface org.alfresco.web.forms.RenderingEngine
RenderingEngine.RenderingException, RenderingEngine.TemplateNotFoundException, RenderingEngine.TemplateProcessorMethod, RenderingEngine.TemplateResourceResolver
 
Field Summary
 
Fields inherited from interface org.alfresco.web.forms.RenderingEngine
ROOT_NAMESPACE
 
Constructor Summary
XSLTRenderingEngine()
           
 
Method Summary
protected  void addParameters(java.util.Map model, org.w3c.dom.Document xslTemplate)
          Adds the specified parameters to the xsl template as variables within the alfresco namespace.
protected  java.util.List addScripts(java.util.Map model, org.w3c.dom.Document xslTemplate)
          Adds a script element to the xsl which makes static methods on this object available to the xsl tempalte.
 java.lang.String getDefaultTemplateFileExtension()
          Returns the default file extension for rendering engine templates for this rendering engine.
 java.lang.String getName()
          Returns the rendering engines name.
protected  javax.xml.transform.Source getXMLSource(java.util.Map model)
           
 void render(java.util.Map model, RenderingEngineTemplate ret, java.io.OutputStream out)
          Renders the xml data in to a presentation format.
 void render(java.util.Map model, RenderingEngineTemplate ret, javax.xml.transform.Result result)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSLTRenderingEngine

public XSLTRenderingEngine()
Method Detail

getName

public java.lang.String getName()
Description copied from interface: RenderingEngine
Returns the rendering engines name.

Specified by:
getName in interface RenderingEngine
Returns:
the name of the rendering engine.

getDefaultTemplateFileExtension

public java.lang.String getDefaultTemplateFileExtension()
Description copied from interface: RenderingEngine
Returns the default file extension for rendering engine templates for this rendering engine.

Specified by:
getDefaultTemplateFileExtension in interface RenderingEngine
Returns:
the default file extension for rendering engine templates for this rendering engine.

addScripts

protected java.util.List addScripts(java.util.Map model,
                                    org.w3c.dom.Document xslTemplate)
Adds a script element to the xsl which makes static methods on this object available to the xsl tempalte.

Parameters:
xslTemplate - the xsl template

addParameters

protected void addParameters(java.util.Map model,
                             org.w3c.dom.Document xslTemplate)
Adds the specified parameters to the xsl template as variables within the alfresco namespace.

Parameters:
model - the variables to place within the xsl template
xslTemplate - the xsl template

getXMLSource

protected javax.xml.transform.Source getXMLSource(java.util.Map model)

render

public void render(java.util.Map model,
                   RenderingEngineTemplate ret,
                   java.io.OutputStream out)
            throws java.io.IOException,
                   RenderingEngine.RenderingException,
                   org.xml.sax.SAXException
Description copied from interface: RenderingEngine
Renders the xml data in to a presentation format.

Specified by:
render in interface RenderingEngine
Parameters:
model - The model
ret - the rendering engine template
out - The output stream to write to
Throws:
java.io.IOException
RenderingEngine.RenderingException
org.xml.sax.SAXException

render

public void render(java.util.Map model,
                   RenderingEngineTemplate ret,
                   javax.xml.transform.Result result)
            throws java.io.IOException,
                   RenderingEngine.RenderingException,
                   org.xml.sax.SAXException
Throws:
java.io.IOException
RenderingEngine.RenderingException
org.xml.sax.SAXException


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.