public class Validate extends Object
Apart from error and optional progress messages, no output is produced.
Modifier and Type | Field and Description |
---|---|
protected EnterpriseConfiguration |
config |
protected int |
repeat |
protected boolean |
showTime |
protected StatisticsReporter |
statsReporter |
protected String |
topLevelElementName |
protected boolean |
useURLs |
protected int |
validationMode |
protected ValidationParams |
validationParams |
protected int |
xsdLanguageVersion |
Constructor and Description |
---|
Validate() |
Modifier and Type | Method and Description |
---|---|
protected void |
applyLocalOptions(CommandLineOptions options,
Configuration config)
Customisation hook: apply options defined locally in a subclass
|
protected void |
badUsage(String message)
Report incorrect usage of the command line, with a list of the options and arguments that are available
|
int |
doValidate(String[] args)
Support method for main program.
|
static Source |
loadDocument(String sourceFileName,
boolean useURLs,
Configuration config)
Load a document, given a filename or URL
|
static void |
main(String[] args)
Main program, can be used directly from the command line.
|
void |
processFile(Source source,
Controller controller)
Process a single file using a supplied schema
|
protected static int |
quit(String message,
int code)
Exit with a message
|
protected void |
setConfiguration()
Create the configuration.
|
void |
setPermittedOptions(CommandLineOptions options)
Set the options that are recognized on the command line.
|
protected EnterpriseConfiguration config
protected ValidationParams validationParams
protected boolean useURLs
protected boolean showTime
protected int repeat
protected int validationMode
protected int xsdLanguageVersion
protected String topLevelElementName
protected StatisticsReporter statsReporter
public static void main(String[] args) throws Exception
args
- List of arguments supplied on operating system command lineException
- Indicates that a compile-time or
run-time error occurredprotected void setConfiguration()
public void setPermittedOptions(CommandLineOptions options)
options
- the CommandLineOptions in which the recognized options are to be registered.public int doValidate(String[] args)
args
- the command-line argumentsprotected void applyLocalOptions(CommandLineOptions options, Configuration config)
options
- the CommandLineOptionsconfig
- the Saxon Configurationprotected static int quit(String message, int code)
message
- The message to be outputcode
- The result code to be returned to the operating
system shellpublic static Source loadDocument(String sourceFileName, boolean useURLs, Configuration config) throws TransformerException
sourceFileName
- the name of the source fileuseURLs
- true if name is to be treated as a URIconfig
- the Saxon configurationTransformerException
- if a document cannot be loadedpublic void processFile(Source source, Controller controller) throws TransformerException
source
- The source XML document to be transformedTransformerException
- If the transformation failsprotected void badUsage(String message)
message
- The error messageCopyright (c) 2004-2013 Saxonica Limited. All rights reserved.