public class XSLTProcessor extends BaseProcessor implements TemplateProcessor
| Modifier and Type | Field and Description |
|---|---|
static org.alfresco.service.namespace.QName |
ROOT_NAMESPACE |
extension, name, processorExtensions, scriptService, services, templateService| Constructor and Description |
|---|
XSLTProcessor() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addParameters(XSLTemplateModel xsltModel,
Document xslTemplate)
Adds the specified parameters to the xsl template as variables within the alfresco namespace.
|
protected List<String> |
addScripts(XSLTemplateModel xsltModel,
Document xslTemplate)
Adds a script element to the xsl which makes static methods on this object available to the xsl tempalte.
|
protected Source |
getXMLSource(Map<org.alfresco.service.namespace.QName,Object> model) |
void |
process(String template,
Object model,
Writer out)
Process a template against the supplied data model and write to the out.
|
void |
process(String template,
Object model,
Writer out,
Locale locale)
Process a template in the given locale against the supplied data model and write to the out.
|
void |
processString(String template,
Object model,
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
|
getExtension, getName, getProcessorExtensions, registerProcessorExtension, setExtension, setName, setScriptService, setServiceRegistry, setTemplateServicepublic void register()
BaseProcessorregister in class BaseProcessorpublic void process(String template, Object model, Writer out)
TemplateProcessorprocess in interface TemplateProcessortemplate - Template name/pathmodel - Object model to process template againstout - Writer object to send output toopublic void processString(String template, Object model, Writer out)
TemplateProcessorprocessString in interface TemplateProcessortemplate - Template stringmodel - Object model to process template againstout - Writer object to send output tooprotected List<String> addScripts(XSLTemplateModel xsltModel, Document xslTemplate)
xslTemplate - the xsl templateprotected void addParameters(XSLTemplateModel xsltModel, Document xslTemplate)
xsltModel - the variables to place within the xsl templatexslTemplate - the xsl templatepublic void process(String template, Object model, Writer out, Locale locale)
TemplateProcessorprocess in interface TemplateProcessortemplate - Template name/pathmodel - Object model to process template againstout - Writer object to send output toolocale - The Locale to process the template inCopyright © 2005–2018 Alfresco Software. All rights reserved.