类 XsltViewResolver

java.lang.Object
cn.taketoday.context.support.ApplicationObjectSupport
所有已实现的接口:
cn.taketoday.beans.factory.Aware, cn.taketoday.context.ApplicationContextAware, cn.taketoday.core.Ordered, ViewResolver

public class XsltViewResolver extends UrlBasedViewResolver
ViewResolver implementation that resolves instances of XsltView by translating the supplied view name into the URL of the XSLT stylesheet.
从以下版本开始:
4.0
作者:
Rob Harrop, Juergen Hoeller
  • 字段详细资料

    • sourceKey

      @Nullable private String sourceKey
    • uriResolver

      @Nullable private URIResolver uriResolver
    • errorListener

      @Nullable private ErrorListener errorListener
    • indent

      private boolean indent
    • outputProperties

      @Nullable private Properties outputProperties
    • cacheTemplates

      private boolean cacheTemplates
  • 构造器详细资料

    • XsltViewResolver

      public XsltViewResolver()
      This resolver requires XsltView.
  • 方法详细资料

    • setSourceKey

      public void setSourceKey(String sourceKey)
      Set the name of the model attribute that represents the XSLT Source. If not specified, the model map will be searched for a matching value type.

      The following source types are supported out of the box: Source, Document, Node, Reader, InputStream and Resource.

    • setUriResolver

      public void setUriResolver(URIResolver uriResolver)
      Set the URIResolver used in the transform.

      The URIResolver handles calls to the XSLT document() function.

    • setErrorListener

      public void setErrorListener(ErrorListener errorListener)
      Set an implementation of the ErrorListener interface for custom handling of transformation errors and warnings.

      If not set, a default SimpleTransformErrorListener is used that simply logs warnings using the logger instance of the view class, and rethrows errors to discontinue the XML transformation.

      另请参阅:
    • setIndent

      public void setIndent(boolean indent)
      Set whether the XSLT transformer may add additional whitespace when outputting the result tree.

      Default is true (on); set this to false (off) to not specify an "indent" key, leaving the choice up to the stylesheet.

      另请参阅:
    • setOutputProperties

      public void setOutputProperties(Properties outputProperties)
      Set arbitrary transformer output properties to be applied to the stylesheet.

      Any values specified here will override defaults that this view sets programmatically.

      另请参阅:
    • setCacheTemplates

      public void setCacheTemplates(boolean cacheTemplates)
      Turn on/off the caching of the XSLT templates.

      The default value is "true". Only set this to "false" in development, where caching does not seriously impact performance.

    • requiredViewClass

      protected Class<?> requiredViewClass()
      从类复制的说明: UrlBasedViewResolver
      Return the required type of view for this resolver. This implementation returns AbstractUrlBasedView.
      覆盖:
      requiredViewClass 在类中 UrlBasedViewResolver
      另请参阅:
    • instantiateView

      protected AbstractUrlBasedView instantiateView()
      从类复制的说明: UrlBasedViewResolver
      Instantiate the specified view class.

      The default implementation uses reflection to instantiate the class.

      覆盖:
      instantiateView 在类中 UrlBasedViewResolver
      返回:
      a new instance of the view class
      另请参阅:
    • buildView

      protected AbstractUrlBasedView buildView(String viewName) throws Exception
      从类复制的说明: UrlBasedViewResolver
      Creates a new View instance of the specified view class and configures it. Does not perform any lookup for pre-defined View instances.

      Framework lifecycle methods as defined by the bean container do not have to be called here; those will be applied by the loadView method after this method returns.

      Subclasses will typically call super.buildView(viewName) first, before setting further properties themselves. loadView will then apply Framework lifecycle methods at the end of this process.

      覆盖:
      buildView 在类中 UrlBasedViewResolver
      参数:
      viewName - the name of the view to build
      返回:
      the View instance
      抛出:
      Exception - if the view couldn't be resolved
      另请参阅: