org.apache.tools.ant.taskdefs.optional
public class SchemaValidate extends XMLValidateTask
Since: Ant1.7
Nested Class Summary | |
---|---|
static class | SchemaValidate.SchemaLocation
representation of a schema location. |
Field Summary | |
---|---|
static String | ERROR_DUPLICATE_SCHEMA Duplicate declaration of schema |
static String | ERROR_NO_XSD_SUPPORT schema features not supported |
static String | ERROR_PARSER_CREATION_FAILURE unable to create parser |
static String | ERROR_SAX_1 SAX1 not supported |
static String | ERROR_TOO_MANY_DEFAULT_SCHEMAS too many default schemas |
static String | MESSAGE_ADDING_SCHEMA adding schema |
Method Summary | |
---|---|
void | addConfiguredSchema(SchemaValidate.SchemaLocation location)
add the schema |
protected void | addSchemaLocations()
build a string list of all schema locations, then set the relevant
property. |
protected void | createAnonymousSchema()
create a schema location to hold the anonymous
schema |
protected XMLReader | createDefaultReader()
Create a reader if the use of the class did not specify another one.
|
boolean | enableJAXP12SchemaValidation()
Set schema attributes in a JAXP 1.2 engine. |
boolean | enableXercesSchemaValidation()
Turn on XSD support in Xerces. |
protected String | getNoNamespaceSchemaURL()
get the URL of the no namespace schema |
void | init()
Called by the project to let the task initialize properly. |
protected void | initValidator()
init the parser : load the parser class, and set features if necessary It
is only after this that the reader is valid
|
protected void | onSuccessfulValidation(int fileProcessed)
handler called on successful file validation.
|
void | setDisableDTD(boolean disableDTD)
flag to disable DTD support. |
protected void | setFeatureIfSupported(String feature, boolean value)
set a feature if it is supported, log at verbose level if
not |
void | setFullChecking(boolean fullChecking)
enable full schema checking. |
void | setNoNamespaceFile(File defaultSchemaFile)
identify a file containing the default schema |
void | setNoNamespaceURL(String defaultSchemaURL)
identify the URL of the default schema |
Parameters: location the schema location.
Throws: BuildException if there is no namespace, or if there already is a declaration of this schema with a different value
Returns: a default XML parser
Returns: true on success, false on failure
See Also:
JAXP 1.2 Approved CHANGES
Returns: true on success, false on failure
Returns: the schema URL
Throws: BuildException if something goes wrong with the build
Throws: BuildException if something went wrong
Parameters: fileProcessed number of files processed.
Parameters: disableDTD a boolean
value.
Parameters: feature the feature. value a boolean
value.
Parameters: fullChecking a boolean
value.
Parameters: defaultSchemaFile the location of the default schema.
Parameters: defaultSchemaURL the URL of the default schema.