Class XSLTransform

java.lang.Object
edu.ucsb.nceas.metacat.spatial.XSLTransform

public class XSLTransform extends Object
A Class that transforms XML documents utitlizing XSL style sheets. This is a convenience class that makes it easier to handle the location of stylesheets and the mapping between a request and a particular stylesheet.
  • Constructor Details

    • XSLTransform

      public XSLTransform()
      Private constructor because all methids are static and do not need an instance.
  • Method Details

    • transform

      public static void transform(String docString, String xslSystemId, PrintWriter pw, Hashtable param)
      Transform an XML document using an XSLT stylesheet to another format, probably HTML or another XML document format.
      Parameters:
      docString - the document to be transformed
      xslSystemId - the system location of the stylesheet
      pw - the PrintWriter to which output is printed
      params - some parameters for inclusion to the transformation
    • transform

      public static void transform(Reader doc, String xslSystemId, PrintWriter pw, Hashtable param)
      Transform an XML document using an XSLT stylesheet to another format, probably HTML or another XML document format.
      Parameters:
      doc - the document to be transformed
      xslSystemId - the system location of the stylesheet
      pw - the PrintWriter to which output is printed
      params - some parameters for inclusion to the transformation
    • main

      public static void main(String[] args)
      the main routine used to test the transform utility. Usage: java DBTransform