Class XmlTransformerService


  • public final class XmlTransformerService
    extends Object
    This class provides methods to transform XML documents using XSLT.
    • Constructor Detail

      • XmlTransformerService

        public XmlTransformerService()
    • Method Detail

      • transformBySourceWithXslCache

        public String transformBySourceWithXslCache​(String strXml,
                                                    StyleSheet xslSource,
                                                    Map<String,​String> params)
        This method performs XSL transformation with cache.
        Parameters:
        strXml - The XML document content
        xslSource - The XSL source
        params - Parameters that can be used by the XSL StyleSheet
        Returns:
        the output html
      • transformBySourceWithXslCache

        public String transformBySourceWithXslCache​(String strXml,
                                                    StyleSheet xslSource,
                                                    Map<String,​String> params,
                                                    Properties outputProperties)
        This method performs XSL transformation with cache.
        Parameters:
        strXml - The XML document content
        xslSource - The XSL source
        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 html
      • transformBySourceWithXslCache

        public String transformBySourceWithXslCache​(String strXml,
                                                    byte[] baSource,
                                                    String strStyleSheetId,
                                                    Map<String,​String> params)
        This method performs XSL transformation with cache.
        Parameters:
        strXml - The XML document content
        baSource - The XSL source
        strStyleSheetId - The StyleSheet Id
        params - Parameters that can be used by the XSL StyleSheet
        Returns:
        The output document
      • transformBySourceWithXslCache

        public String transformBySourceWithXslCache​(String strXml,
                                                    byte[] baSource,
                                                    String strStyleSheetId,
                                                    Map<String,​String> params,
                                                    Properties outputProperties)
        This method performs XSL transformation with cache.
        Parameters:
        strXml - The XML document content
        baSource - 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
      • transformBySourceWithXslCache

        public String transformBySourceWithXslCache​(String strXml,
                                                    Source sourceStyleSheet,
                                                    String strStyleSheetId,
                                                    Map<String,​String> params,
                                                    Properties outputProperties)
        This method performs XSL transformation with cache.
        Parameters:
        strXml - The XML document content
        sourceStyleSheet - The XSL source
        strStyleSheetId - The StyleSheet Id
        params - Parameters that can be used by the XSL StyleSheet
        outputProperties - the output parameter
        Returns:
        The output document
      • transformBySourceWithXslCache

        public String transformBySourceWithXslCache​(Source sourceXml,
                                                    Source sourceStyleSheet,
                                                    String strStyleSheetId,
                                                    Map<String,​String> params,
                                                    Properties outputProperties)
        This method performs XSL transformation with cache.
        Parameters:
        sourceXml - The XML document content
        sourceStyleSheet - The XSL source
        strStyleSheetId - The StyleSheet Id
        params - Parameters that can be used by the XSL StyleSheet
        outputProperties - the output parameter
        Returns:
        The output document
      • clearXslCache

        public static void clearXslCache()
        This method clean XSL transformer cache