Class XSLTResult

java.lang.Object
org.apache.struts2.result.xslt.XSLTResult
All Implemented Interfaces:
Serializable, Result

public class XSLTResult extends Object implements Result
XSLTResult uses XSLT to transform an action object to XML.
See Also:
  • Field Details

    • DEFAULT_PARAM

      public static final String DEFAULT_PARAM
      'stylesheetLocation' parameter. Points to the xsl.
      See Also:
    • noCache

      protected boolean noCache
      Determines whether or not the result should allow caching.
  • Constructor Details

    • XSLTResult

      public XSLTResult()
    • XSLTResult

      public XSLTResult(String stylesheetLocation)
  • Method Details

    • setNoCache

      public void setNoCache(String xsltNoCache)
    • setStylesheetLocation

      public void setStylesheetLocation(String location)
    • getStylesheetLocation

      public String getStylesheetLocation()
    • getExposedValue

      public String getExposedValue()
    • setExposedValue

      public void setExposedValue(String exposedValue)
    • getStatus

      public String getStatus()
    • setStatus

      public void setStatus(String status)
    • getEncoding

      public String getEncoding()
    • setEncoding

      public void setEncoding(String encoding)
    • setParse

      public void setParse(boolean parse)
      Parameters:
      parse - if true, parse the stylesheet location for OGNL expressions.
    • execute

      public void execute(ActionInvocation invocation) throws Exception
      Specified by:
      execute in interface Result
      Throws:
      Exception
    • createTransformerFactory

      protected TransformerFactory createTransformerFactory()
    • buildErrorListener

      protected ErrorListener buildErrorListener()
    • getAdapterFactory

      protected AdapterFactory getAdapterFactory()
    • setAdapterFactory

      protected void setAdapterFactory(AdapterFactory adapterFactory)
    • getURIResolver

      protected URIResolver getURIResolver()
      Returns:
      the URI Resolver to be called by the processor when it encounters an xsl:include, xsl:import, or document() function. The default is an instance of ServletURIResolver, which operates relative to the servlet context.
    • getTemplates

      protected Templates getTemplates(String path) throws TransformerException, IOException
      Throws:
      TransformerException
      IOException
    • getDOMSourceForStack

      protected Source getDOMSourceForStack(Object value)