org.alfresco.repo.template
Class XSLTProcessor
java.lang.Object
org.alfresco.repo.processor.BaseProcessor
org.alfresco.repo.template.XSLTProcessor
- All Implemented Interfaces:
- org.alfresco.processor.Processor, TemplateProcessor
public class XSLTProcessor
- extends BaseProcessor
- implements TemplateProcessor
Field Summary |
static org.alfresco.service.namespace.QName |
ROOT_NAMESPACE
|
Method Summary |
protected void |
addParameters(XSLTemplateModel xsltModel,
org.w3c.dom.Document xslTemplate)
Adds the specified parameters to the xsl template as variables within the alfresco namespace. |
protected java.util.List |
addScripts(XSLTemplateModel xsltModel,
org.w3c.dom.Document xslTemplate)
Adds a script element to the xsl which makes static methods on this object available to the xsl tempalte. |
protected javax.xml.transform.Source |
getXMLSource(java.util.Map model)
|
void |
process(java.lang.String template,
java.lang.Object model,
java.io.Writer out)
Process a template against the supplied data model and write to the out. |
void |
processString(java.lang.String template,
java.lang.Object model,
java.io.Writer out)
Process a string template against the supplied data model and write to the out. |
void |
register()
Registers this processor with the relevant services |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.alfresco.processor.Processor |
getExtension, getName, registerProcessorExtension |
ROOT_NAMESPACE
public static final org.alfresco.service.namespace.QName ROOT_NAMESPACE
XSLTProcessor
public XSLTProcessor()
register
public void register()
- Description copied from class:
BaseProcessor
- Registers this processor with the relevant services
- Overrides:
register
in class BaseProcessor
process
public void process(java.lang.String template,
java.lang.Object model,
java.io.Writer out)
- Description copied from interface:
TemplateProcessor
- Process a template against the supplied data model and write to the out.
- Specified by:
process
in interface TemplateProcessor
- Parameters:
template
- Template name/pathmodel
- Object model to process template againstout
- Writer object to send output too
processString
public void processString(java.lang.String template,
java.lang.Object model,
java.io.Writer out)
- Description copied from interface:
TemplateProcessor
- Process a string template against the supplied data model and write to the out.
- Specified by:
processString
in interface TemplateProcessor
- Parameters:
template
- Template stringmodel
- Object model to process template againstout
- Writer object to send output too
addScripts
protected java.util.List addScripts(XSLTemplateModel xsltModel,
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(XSLTemplateModel xsltModel,
org.w3c.dom.Document xslTemplate)
- Adds the specified parameters to the xsl template as variables within the alfresco namespace.
- Parameters:
xsltModel
- the variables to place within the xsl templatexslTemplate
- the xsl template
getXMLSource
protected javax.xml.transform.Source getXMLSource(java.util.Map model)
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.