fr.paris.lutece.util.xml
Class XmlTransformer

java.lang.Object
  extended by fr.paris.lutece.util.xml.XmlTransformer

public final class XmlTransformer
extends Object

This class provides methods to transform XML documents using XSLT with cache


Field Summary
static int MAX_TRANSFORMER_SIZE
           
static String PROPERTY_TRANSFORMER_POOL_SIZE
           
static int TRANSFORMER_POOL_SIZE
           
 
Constructor Summary
XmlTransformer()
           
 
Method Summary
static void cleanTransformerList()
          Remove all Transformer instance from cache
static int getTransformersCount()
          Gets the number of transformers
 String transform(Source source, Source stylesheet, String strStyleSheetId, Map<String,String> params, Properties outputProperties)
          Transform XML documents using XSLT with cache
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_TRANSFORMER_POOL_SIZE

public static final String PROPERTY_TRANSFORMER_POOL_SIZE
See Also:
Constant Field Values

TRANSFORMER_POOL_SIZE

public static final int TRANSFORMER_POOL_SIZE

MAX_TRANSFORMER_SIZE

public static final int MAX_TRANSFORMER_SIZE
See Also:
Constant Field Values
Constructor Detail

XmlTransformer

public XmlTransformer()
Method Detail

cleanTransformerList

public static void cleanTransformerList()
Remove all Transformer instance from cache


getTransformersCount

public static int getTransformersCount()
Gets the number of transformers

Returns:
the transformers count

transform

public String transform(Source source,
                        Source stylesheet,
                        String strStyleSheetId,
                        Map<String,String> params,
                        Properties outputProperties)
                 throws Exception
Transform XML documents using XSLT with cache

Parameters:
source - The XML document content
stylesheet - The XSL source
strStyleSheetId - The StyleSheet Id
params - Parameters that can be used by the XSL StyleSheet
outputProperties - Properties to use for the XSL transform. Will overload the XSL output definition.
Returns:
The output document
Throws:
Exception - The exception


Copyright © 2014 Mairie de Paris. All Rights Reserved.