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 Details

    • ROOT_NAMESPACE

      public static final QName ROOT_NAMESPACE
  • Constructor Details

    • XSLTProcessor

      public XSLTProcessor()
  • Method Details

    • 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(String template, Object model, 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/path
      model - Object model to process template against
      out - Writer object to send output too
    • processString

      public void processString(String template, Object model, 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 string
      model - Object model to process template against
      out - Writer object to send output too
    • addScripts

      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.
      Parameters:
      xslTemplate - the xsl template
    • addParameters

      protected void addParameters(XSLTemplateModel xsltModel, 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 template
      xslTemplate - the xsl template
    • getXMLSource

      protected Source getXMLSource(Map<QName,Object> model)
    • process

      public void process(String template, Object model, Writer out, Locale locale)
      Description copied from interface: TemplateProcessor
      Process a template in the given locale against the supplied data model and write to the out.
      Specified by:
      process in interface TemplateProcessor
      Parameters:
      template - Template name/path
      model - Object model to process template against
      out - Writer object to send output too
      locale - The Locale to process the template in