Package org.custommonkey.xmlunit
Class Transform
java.lang.Object
org.custommonkey.xmlunit.Transform
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a transformation using String input XML and stylesheet in a FileCreate a transformation using String input XML and String stylesheetCreate a transformation using Source input XML and Source stylesheetCreate a transformation that allows us to serialize a DOM NodeCreate a transformation from an input Node and stylesheet in a FileCreate a transformation from an input Node and stylesheet in a StringTransform
(InputSource input, File stylesheet) Create a transformation using InputSource input XML and stylesheet in a FileTransform
(InputSource input, InputSource stylesheet) Create a transformation using InputSource input XML and InputSource stylesheet -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clear parameters used for the transformationgetParameter
(String name) See a parameter used for the transformationPerform the XSLT transformation specified in the constructorPerform the XSLT transformation specified in the constructorvoid
setErrorListener
(ErrorListener errorListener) Set the ErrorListener for the transformationvoid
setOutputProperties
(Properties outputProperties) Override output properties specified in the transformation stylesheetvoid
setOutputProperty
(String name, String value) Override an output property specified in the transformation stylesheetvoid
setParameter
(String name, Object value) Add a parameter for the transformationvoid
setURIResolver
(URIResolver uriResolver) Set the URIResolver for the transformationprotected void
transformTo
(Result result) Perform the actual transformation
-
Constructor Details
-
Transform
Create a transformation using String input XML and String stylesheet- Parameters:
input
-stylesheet
-
-
Transform
Create a transformation using String input XML and stylesheet in a File- Parameters:
input
-stylesheet
-
-
Transform
Create a transformation using InputSource input XML and InputSource stylesheet- Parameters:
input
-stylesheet
-
-
Transform
Create a transformation using InputSource input XML and stylesheet in a File- Parameters:
input
-stylesheet
-
-
Transform
Create a transformation that allows us to serialize a DOM Node- Parameters:
source
-
-
Transform
Create a transformation from an input Node and stylesheet in a String- Parameters:
sourceNode
-stylesheet
-
-
Transform
Create a transformation from an input Node and stylesheet in a File- Parameters:
sourceNode
-stylesheet
-
-
Transform
Create a transformation using Source input XML and Source stylesheet- Parameters:
inputReader
-stylesheetReader
-
-
-
Method Details
-
transformTo
Perform the actual transformation- Parameters:
result
-- Throws:
TransformerException
-
getResultString
Perform the XSLT transformation specified in the constructor- Returns:
- the result as a String
- Throws:
TransformerException
-
getResultDocument
Perform the XSLT transformation specified in the constructor- Returns:
- the result as a DOM Document
- Throws:
TransformerException
-
setOutputProperty
Override an output property specified in the transformation stylesheet- Parameters:
name
-value
-
-
setOutputProperties
Override output properties specified in the transformation stylesheet- Parameters:
outputProperties
-- See Also:
-
setParameter
Add a parameter for the transformation- Parameters:
name
-value
-- See Also:
-
getParameter
See a parameter used for the transformation- Parameters:
name
-- Returns:
- the parameter value
- See Also:
-
clearParameters
public void clearParameters()Clear parameters used for the transformation- See Also:
-
setURIResolver
Set the URIResolver for the transformation- See Also:
-
setErrorListener
Set the ErrorListener for the transformation- See Also:
-