|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.saxonica.Validate
public class Validate
This Validate class provides a command line interface that causes a source document to be parsed and validated against a schema. Apart from error messages, no output is produced.
Field Summary | |
---|---|
protected EnterpriseConfiguration |
config
|
protected int |
repeat
|
protected boolean |
showTime
|
protected String |
topLevelElementName
|
protected boolean |
useURLs
|
protected int |
validationMode
|
protected int |
xsdLanguageVersion
|
Constructor Summary | |
---|---|
Validate()
|
Method Summary | |
---|---|
protected void |
badUsage(String name,
String message)
Report incorrect usage of the command line, with a list of the options and arguments that are available |
protected void |
doValidate(String[] args,
String name)
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)
Process a single file using a supplied schema |
protected static void |
quit(String message,
int code)
Exit with a message |
protected void |
setConfiguration()
Create the configuration. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected EnterpriseConfiguration config
protected boolean useURLs
protected boolean showTime
protected int repeat
protected int validationMode
protected int xsdLanguageVersion
protected String topLevelElementName
Constructor Detail |
---|
public Validate()
Method Detail |
---|
public static void main(String[] args) throws Exception
args
- List of arguments supplied on operating system command line
Exception
- Indicates that a compile-time or
run-time error occurredprotected void setConfiguration()
protected void doValidate(String[] args, String name)
args
- the command-line argumentsname
- name of the class, to be used in error messagesprotected static void 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 configuration
TransformerException
public void processFile(Source source) throws TransformerException
source
- The source XML document to be transformed
TransformerException
- If the transformation failsprotected void badUsage(String name, String message)
name
- The name of the command being executed (allows subclassing)message
- The error message
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |