Class XmlTransformer


  • public final class XmlTransformer
    extends java.lang.Object
    This class provides methods to transform XML documents using XSLT with cache
    • Constructor Summary

      Constructors 
      Constructor Description
      XmlTransformer()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void cleanTransformerList()
      Remove all Templates instance from cache.
      static int getTransformersCount()
      Gets the number of templates.
      java.lang.String transform​(javax.xml.transform.Source source, javax.xml.transform.Source stylesheet, java.lang.String strStyleSheetId, java.util.Map<java.lang.String,​java.lang.String> params, java.util.Properties outputProperties)
      Transform XML documents using XSLT with cache
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • PROPERTY_TRANSFORMER_POOL_SIZE

        public static final java.lang.String PROPERTY_TRANSFORMER_POOL_SIZE
        See Also:
        Constant Field Values
      • TRANSFORMER_POOL_SIZE

        public static final int TRANSFORMER_POOL_SIZE
    • Constructor Detail

      • XmlTransformer

        public XmlTransformer()
    • Method Detail

      • 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 java.lang.String transform​(javax.xml.transform.Source source,
                                          javax.xml.transform.Source stylesheet,
                                          java.lang.String strStyleSheetId,
                                          java.util.Map<java.lang.String,​java.lang.String> params,
                                          java.util.Properties outputProperties)
                                   throws javax.xml.transform.TransformerException
        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:
        javax.xml.transform.TransformerException - The exception