Package fr.paris.lutece.util.xml
Class XmlTransformer
java.lang.Object
fr.paris.lutece.util.xml.XmlTransformer
This class provides methods to transform XML documents using XSLT with cache
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidRemove all Templates instance from cache.static intGets the number of templates.transform(Source source, Source stylesheet, String strStyleSheetId, Map<String, String> params, Properties outputProperties) Transform XML documents using XSLT with cache
-
Field Details
-
PROPERTY_TRANSFORMER_POOL_SIZE
- See Also:
-
TRANSFORMER_POOL_SIZE
public static final int TRANSFORMER_POOL_SIZE -
MAX_TRANSFORMER_SIZE
public static final int MAX_TRANSFORMER_SIZE- See Also:
-
-
Constructor Details
-
XmlTransformer
public XmlTransformer()
-
-
Method Details
-
cleanTransformerList
public static void cleanTransformerList()Remove all Templates instance from cache. Previously (before 6.0.0) the cache stored transformers, now it stores templates. -
getTransformersCount
public static int getTransformersCount()Gets the number of templates. Previously (before 6.0.0) the cache stored transformers, now it stores templates.- Returns:
- the transformers count
-
transform
public String transform(Source source, Source stylesheet, String strStyleSheetId, Map<String, String> params, Properties outputProperties) throws TransformerExceptionTransform XML documents using XSLT with cache- Parameters:
source- The XML document contentstylesheet- The XSL sourcestrStyleSheetId- The StyleSheet Idparams- Parameters that can be used by the XSL StyleSheetoutputProperties- Properties to use for the XSL transform. Will overload the XSL output definition.- Returns:
- The output document
- Throws:
TransformerException- The exception
-