com.icl.saxon

## Class StyleSheet

- java.lang.Object
- - com.icl.saxon.StyleSheet

- Direct Known Subclasses:
    WinStyleSheet

      public class StyleSheet
      extends java.lang.Object

  This StyleSheet class is the entry point to the Saxon XSLT Processor. This class is provided to control the processor from the command line.

  The XSLT syntax supported conforms to the W3C XSLT 1.0 and XPath 1.0 recommendation. Only the transformation language is implemented (not the formatting objects). Saxon extensions are documented in the file extensions.html

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected TransformerFactoryImpl` | `factory`
    `protected NamePool` | `namePool`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StyleSheet()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `badUsage(java.lang.String name, java.lang.String message)`
    `protected void` | `doMain(java.lang.String[] args, StyleSheet app, java.lang.String name)` Support method for main program.
    `static void` | `main(java.lang.String[] args)` Main program, can be used directly from the command line.
    `static TraceListener` | `makeTraceListener(java.lang.String className)`
    `static javax.xml.transform.URIResolver` | `makeURIResolver(java.lang.String className)`
    `void` | `processDirectory(java.io.File sourceDir, javax.xml.transform.Templates sheet, java.io.File outputDir, ParameterSet params)` Process each file in the source directory using the same supplied stylesheet
    `void` | `processDirectoryAssoc(java.io.File sourceDir, java.io.File outputDir, ParameterSet params)` Process each file in the source directory using its own associated stylesheet
    `void` | `processFile(javax.xml.transform.Source source, javax.xml.transform.Templates sheet, java.io.File outputFile, ParameterSet params)` Process a single file using a supplied stylesheet
    `void` | `processFileAssoc(javax.xml.transform.Source sourceInput, java.lang.String localName, java.io.File outputFile, ParameterSet params)` Process a single source file using its associated stylesheet(s)
    `protected static void` | `quit(java.lang.String message, int code)` Exit with a message

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### factory

          protected TransformerFactoryImpl factory

    - #### namePool

          protected NamePool namePool

  - ### Constructor Detail

    - #### StyleSheet

          public StyleSheet()

  - ### Method Detail

    - #### main

          public static void main(java.lang.String[] args)
                           throws java.lang.Exception

      Main program, can be used directly from the command line.

      The format is:

      java com.icl.saxon.StyleSheet [options] source-file style-file >output-file

      followed by any number of parameters in the form {keyword=value}... which can be referenced from within the stylesheet.

      This program applies the XSL style sheet in style-file to the source XML document in source-file.

      Throws:
        `java.lang.Exception`

    - #### doMain

          protected void doMain(java.lang.String[] args,
                    StyleSheet app,
                    java.lang.String name)

      Support method for main program. This support method can also be invoked from subclasses that support the same command line interface
      Parameters:
        `args` - the command-line arguments
        `app` - instance of the StyleSheet class (or a subclass) to be invoked
        `name` - name of the class, to be used in error messages

    - #### quit

          protected static void quit(java.lang.String message,
                  int code)

      Exit with a message

    - #### processDirectoryAssoc

          public void processDirectoryAssoc(java.io.File sourceDir,
                                   java.io.File outputDir,
                                   ParameterSet params)
                                     throws java.lang.Exception

      Process each file in the source directory using its own associated stylesheet
      Throws:
        `java.lang.Exception`

    - #### processFileAssoc

          public void processFileAssoc(javax.xml.transform.Source sourceInput,
                              java.lang.String localName,
                              java.io.File outputFile,
                              ParameterSet params)
                                throws javax.xml.transform.TransformerException

      Process a single source file using its associated stylesheet(s)
      Throws:
        `javax.xml.transform.TransformerException`

    - #### processDirectory

          public void processDirectory(java.io.File sourceDir,
                              javax.xml.transform.Templates sheet,
                              java.io.File outputDir,
                              ParameterSet params)
                                throws javax.xml.transform.TransformerException

      Process each file in the source directory using the same supplied stylesheet
      Throws:
        `javax.xml.transform.TransformerException`

    - #### processFile

          public void processFile(javax.xml.transform.Source source,
                         javax.xml.transform.Templates sheet,
                         java.io.File outputFile,
                         ParameterSet params)
                           throws javax.xml.transform.TransformerException

      Process a single file using a supplied stylesheet
      Throws:
        `javax.xml.transform.TransformerException`

    - #### badUsage

          protected void badUsage(java.lang.String name,
                      java.lang.String message)

    - #### makeURIResolver

          public static javax.xml.transform.URIResolver makeURIResolver(java.lang.String className)
                                                                 throws javax.xml.transform.TransformerException

      Throws:
        `javax.xml.transform.TransformerException`

    - #### makeTraceListener

          public static TraceListener makeTraceListener(java.lang.String className)
                                                 throws javax.xml.transform.TransformerException

      Throws:
        `javax.xml.transform.TransformerException`