Class Transform

java.lang.Object
org.custommonkey.xmlunit.Transform

public class Transform extends Object
Handy wrapper for an XSLT transformation performed using JAXP/Trax. Note that transformation is not actually performed until a call to getResultXXX method, and Templates are not used.
  • Constructor Details

    • Transform

      public Transform(String input, String stylesheet)
      Create a transformation using String input XML and String stylesheet
      Parameters:
      input - document to transform
      stylesheet - stylesheet to use for transformation
    • Transform

      public Transform(String input, File stylesheet)
      Create a transformation using String input XML and stylesheet in a File
      Parameters:
      input - document to transform
      stylesheet - stylesheet to use for transformation
    • Transform

      public Transform(InputSource input, InputSource stylesheet)
      Create a transformation using InputSource input XML and InputSource stylesheet
      Parameters:
      input - document to transform
      stylesheet - stylesheet to use for transformation
    • Transform

      public Transform(InputSource input, File stylesheet)
      Create a transformation using InputSource input XML and stylesheet in a File
      Parameters:
      input - document to transform
      stylesheet - stylesheet to use for transformation
    • Transform

      public Transform(Node sourceNode)
      Create a transformation that allows us to serialize a DOM Node
      Parameters:
      sourceNode - document to transform
    • Transform

      public Transform(Node sourceNode, String stylesheet)
      Create a transformation from an input Node and stylesheet in a String
      Parameters:
      sourceNode - document to transform
      stylesheet - stylesheet to use for transformation
    • Transform

      public Transform(Node sourceNode, File stylesheet)
      Create a transformation from an input Node and stylesheet in a File
      Parameters:
      sourceNode - document to transform
      stylesheet - stylesheet to use for transformation
    • Transform

      public Transform(Source inputSource, Source stylesheetSource)
      Create a transformation using Source input XML and Source stylesheet
      Parameters:
      inputSource - document to transform
      stylesheetSource - stylesheet to use for transformation
  • Method Details