Class StyleSheet
java.lang.Object
com.icl.saxon.StyleSheet
- Direct Known Subclasses:
WinStyleSheet
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
- Author:
- M.H.Kay
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voiddoMain(String[] args, StyleSheet app, String name) Support method for main program.static voidMain program, can be used directly from the command line.static TraceListenermakeTraceListener(String className) static URIResolvermakeURIResolver(String className) voidprocessDirectory(File sourceDir, Templates sheet, File outputDir, ParameterSet params) Process each file in the source directory using the same supplied stylesheetvoidprocessDirectoryAssoc(File sourceDir, File outputDir, ParameterSet params) Process each file in the source directory using its own associated stylesheetvoidprocessFile(Source source, Templates sheet, File outputFile, ParameterSet params) Process a single file using a supplied stylesheetvoidprocessFileAssoc(Source sourceInput, String localName, File outputFile, ParameterSet params) Process a single source file using its associated stylesheet(s)protected static voidExit with a message
-
Field Details
-
factory
-
namePool
-
showTime
boolean showTime -
repeat
int repeat
-
-
Constructor Details
-
StyleSheet
public StyleSheet()
-
-
Method Details
-
main
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:
Exception
-
doMain
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 argumentsapp- instance of the StyleSheet class (or a subclass) to be invokedname- name of the class, to be used in error messages
-
quit
Exit with a message -
processDirectoryAssoc
public void processDirectoryAssoc(File sourceDir, File outputDir, ParameterSet params) throws Exception Process each file in the source directory using its own associated stylesheet- Throws:
Exception
-
processFileAssoc
public void processFileAssoc(Source sourceInput, String localName, File outputFile, ParameterSet params) throws TransformerException Process a single source file using its associated stylesheet(s)- Throws:
TransformerException
-
processDirectory
public void processDirectory(File sourceDir, Templates sheet, File outputDir, ParameterSet params) throws TransformerException Process each file in the source directory using the same supplied stylesheet- Throws:
TransformerException
-
processFile
public void processFile(Source source, Templates sheet, File outputFile, ParameterSet params) throws TransformerException Process a single file using a supplied stylesheet- Throws:
TransformerException
-
badUsage
-
makeURIResolver
- Throws:
TransformerException
-
makeTraceListener
- Throws:
TransformerException
-