public abstract class

XSLTSupport

extends Object
java.lang.Object
   ↳ com.microstrategy.utils.xml.XSLTSupport

Class Overview

This class provides parser-independent, JAXP-based, support for XSLT-based operations.

Summary

Public Constructors
XSLTSupport()
Public Methods
abstract boolean getXSLCaching()
Returns the current status of XSL caching on this class.
static XSLTSupport newInstance()
Returns an instance of an XSLTSupport object.
abstract void setXSLCaching(boolean cachingIsOn)
Sets the status of XSL caching on this class, if the underlying XSL processor implements such functionality.
abstract void transformToFile(File xmlFile, String xslFile, String outputFile)
Transforms the given XML file using the given XSL file and writes the result into the specified output file
abstract Node transformToNode(String xmlString, InputStream stream)
Transforms the given XML String by the given XSLT InputStream, and returns the result from the XSL transformation as a DOM Node.
abstract Node transformToNode(Node xmlDoc, InputStream stream)
Transforms the given XML DOM Node by the given XSLT file, and returns the result from the XSL transformation as a DOM Node.
abstract Node transformToNode(Node xmlDoc, String xslFile)
Transforms the given XML DOM Node by the given XSLT file, and returns the result from the XSL transformation as a DOM Node.
abstract Node transformToNode(String xmlString, String xslFile)
Transforms the given XML String by the given XSLT file, and returns the result from the XSL transformation as a DOM Node.
abstract String transformToString(InputStream xmlStream, String xslFile)
Transforms the given XML InputStream by the given XSLT file, and returns the result from the XSL transformation in string format.
abstract String transformToString(Node xmlDoc, String xslFile)
Transforms the given XML Node by the given XSLT file, and returns the result from the XSL transformation in string format.
abstract String transformToString(File xmlFile, String xslFile)
Transforms the given XML File by the given XSLT file, and returns the result from the XSL transformation in string format.
abstract String transformToString(String xmlString, String xslFile)
Transforms the given XML String by the given XSLT file, and returns the result from the XSL transformation in string format.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public XSLTSupport ()

Public Methods

public abstract boolean getXSLCaching ()

Returns the current status of XSL caching on this class.

Returns
  • Whether XSL caching is currently active on this object.

public static XSLTSupport newInstance ()

Returns an instance of an XSLTSupport object.

Returns
  • A new XSLTSupport object.

public abstract void setXSLCaching (boolean cachingIsOn)

Sets the status of XSL caching on this class, if the underlying XSL processor implements such functionality. If this is set to true, then the XSL will be cached in memory. This generally results in a boost in speed, at the cost of not being able to detect changes in the XSL file while the in-memory cache is active(the lifetime of the JVM).

Parameters
cachingIsOn True if caching should be on, false if it should be off.

public abstract void transformToFile (File xmlFile, String xslFile, String outputFile)

Transforms the given XML file using the given XSL file and writes the result into the specified output file

Parameters
xmlFile XML file that needs to be transformed File
xslFile Path of the XSL file that needs to be used for the transformation
outputFile Path of the output file that needs to be created or over-written that is a result of the transformation.
Throws
XMLSupportException
XMLSupportException

public abstract Node transformToNode (String xmlString, InputStream stream)

Transforms the given XML String by the given XSLT InputStream, and returns the result from the XSL transformation as a DOM Node.

Parameters
xmlString An XML String.
stream An InputStream containing an XSLT transform.
Returns
  • The result of the transformation, in DOM Node format.
Throws
XMLSupportException Signals an error occurred while tranforming.

public abstract Node transformToNode (Node xmlDoc, InputStream stream)

Transforms the given XML DOM Node by the given XSLT file, and returns the result from the XSL transformation as a DOM Node.

Parameters
xmlDoc An XML Node.
stream An InputStream containing an XSLT transform.
Returns
  • The result of the transformation, in DOM Node format.
Throws
XMLSupportException Signals an error occurred while tranforming.

public abstract Node transformToNode (Node xmlDoc, String xslFile)

Transforms the given XML DOM Node by the given XSLT file, and returns the result from the XSL transformation as a DOM Node.

Parameters
xmlDoc An XML Node.
xslFile The name of an XSL file.
Returns
  • The result of the transformation, in DOM Node format.
Throws
XMLSupportException Signals an error occurred while tranforming.

public abstract Node transformToNode (String xmlString, String xslFile)

Transforms the given XML String by the given XSLT file, and returns the result from the XSL transformation as a DOM Node.

Parameters
xmlString An XML String.
xslFile The name of an XSL file.
Returns
  • The result of the transformation, in DOM Node format.
Throws
XMLSupportException Signals an error occurred while tranforming.

public abstract String transformToString (InputStream xmlStream, String xslFile)

Transforms the given XML InputStream by the given XSLT file, and returns the result from the XSL transformation in string format.

Parameters
xmlStream An XML inputStream.
xslFile The name of an XSL file.
Returns
  • The result of the transformation, in String format.
Throws
XMLSupportException Signals an error occurred while tranforming.

public abstract String transformToString (Node xmlDoc, String xslFile)

Transforms the given XML Node by the given XSLT file, and returns the result from the XSL transformation in string format.

Parameters
xmlDoc An XML DOM Node.
xslFile The name of an XSL file.
Returns
  • The result of the transformation, in String format.
Throws
XMLSupportException Signals an error occurred while tranforming.

public abstract String transformToString (File xmlFile, String xslFile)

Transforms the given XML File by the given XSLT file, and returns the result from the XSL transformation in string format.

Parameters
xmlFile An XML File.
xslFile The name of an XSL file.
Returns
  • The result of the transformation, in String format.
Throws
XMLSupportException Signals an error occurred while tranforming.

public abstract String transformToString (String xmlString, String xslFile)

Transforms the given XML String by the given XSLT file, and returns the result from the XSL transformation in string format.

Parameters
xmlString An XML String.
xslFile The name of an XSL file.
Returns
  • The result of the transformation, in String format.
Throws
XMLSupportException Signals an error occurred while tranforming.