站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.0.5 API 文档英文版

TransformerUtils (Spring Framework API 2.0) - Spring Framework 2.0.5 API 文档英文版

The Spring Framework

org.springframework.web.servlet.view.xslt
Class TransformerUtils

java.lang.Object
  extended by org.springframework.web.servlet.view.xslt.TransformerUtils

public abstract class TransformerUtils
extends Object

Contains common behavior relating to Transformers.

Since:
2.0
Author:
Rick Evans

Field Summary
static int DEFAULT_INDENT_AMOUNT
          The indent amount of characters if indenting is enabled.
 
Constructor Summary
TransformerUtils()
           
 
Method Summary
static void disableIndenting(Transformer transformer)
          Disable indenting for the supplied Transformer.
static void enableIndenting(Transformer transformer)
          Enable indenting for the supplied Transformer.
static void enableIndenting(Transformer transformer, int indentAmount)
          Enable indenting for the supplied Transformer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_INDENT_AMOUNT

public static final int DEFAULT_INDENT_AMOUNT
The indent amount of characters if indenting is enabled.

Defaults to "2".

See Also:
Constant Field Values
Constructor Detail

TransformerUtils

public TransformerUtils()
Method Detail

enableIndenting

public static void enableIndenting(Transformer transformer)
Enable indenting for the supplied Transformer.

If the underlying XSLT engine is Xalan, then the special output key indent-amount will be also be set to a value of DEFAULT_INDENT_AMOUNT characters.

Parameters:
transformer - the target transformer
Throws:
IllegalArgumentException - if the supplied Transformer is null
See Also:
Transformer.setOutputProperty(String, String), OutputKeys.INDENT

enableIndenting

public static void enableIndenting(Transformer transformer,
                                   int indentAmount)
Enable indenting for the supplied Transformer.

If the underlying XSLT engine is Xalan, then the special output key indent-amount will be also be set to a value of DEFAULT_INDENT_AMOUNT characters.

Parameters:
transformer - the target transformer
indentAmount - the size of the indent (2 characters, 3 characters, etc.)
Throws:
IllegalArgumentException - if the supplied Transformer is null or if the supplied indent amount is less than zero (that is, negative)
See Also:
Transformer.setOutputProperty(String, String), OutputKeys.INDENT

disableIndenting

public static void disableIndenting(Transformer transformer)
Disable indenting for the supplied Transformer.

Parameters:
transformer - the target transformer
Throws:
IllegalArgumentException - if the supplied Transformer is null
See Also:
OutputKeys.INDENT

The Spring Framework

Copyright © 2002-2007 The Spring Framework.