XMLValidateTask
| Modifier and Type | Class and Description |
|---|---|
| public static class | SchemaValidate.SchemaLocation
representation of a schema location. |
| Modifier and Type | Field and Description |
|---|---|
| private SchemaValidate. | anonymousSchema
default URL for nonamespace schemas |
| private boolean | disableDTD
flag to disable DTD support. |
| public static final String | ERROR_DUPLICATE_SCHEMA
Duplicate declaration of schema |
| public static final String | ERROR_NO_XSD_SUPPORT
schema features not supported |
| public static final String | ERROR_PARSER_CREATION_FAILURE
unable to create parser |
| public static final String | ERROR_SAX_1
SAX1 not supported |
| public static final String | ERROR_TOO_MANY_DEFAULT_SCHEMAS
too many default schemas |
| private boolean | fullChecking
full checking of a schema |
| public static final String | MESSAGE_ADDING_SCHEMA
adding schema |
| private Map | schemaLocations
map of all declared schemas; we catch and complain about redefinitions |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| protected void | |
| protected void | |
| protected XMLReader | Returns: a default XML parserOverrides org. |
| public boolean | Returns: true on success, false on failureSet schema attributes in a JAXP 1.2 engine. |
| public boolean | Returns: true on success, false on failureTurn on XSD support in Xerces. |
| protected String | |
| public void | init()
Overrides org. |
| protected void | initValidator()
Overrides org. |
| protected void | onSuccessfulValidation(int
number of files processed. fileProcessed)Overrides org. |
| public void | |
| protected void | setFeatureIfSupported(String
the feature. feature, boolean a value)boolean value.set a feature if it is supported, log at verbose level if not |
| public void | |
| public void | setNoNamespaceFile(File
the location of the default schema. defaultSchemaFile)identify a file containing the default schema |
| private void | setNoNamespaceSchemaProperty(String
name of the property to set property)set nonamespace handling up for xerces or other parsers |
| public void | setNoNamespaceURL(String
the URL of the default schema. defaultSchemaURL)identify the URL of the default schema |
| anonymousSchema | back to summary |
|---|---|
| private SchemaValidate. default URL for nonamespace schemas | |
| disableDTD | back to summary |
|---|---|
| private boolean disableDTD flag to disable DTD support. Best left enabled. | |
| ERROR_DUPLICATE_SCHEMA | back to summary |
|---|---|
| public static final String ERROR_DUPLICATE_SCHEMA Duplicate declaration of schema | |
| ERROR_NO_XSD_SUPPORT | back to summary |
|---|---|
| public static final String ERROR_NO_XSD_SUPPORT schema features not supported | |
| ERROR_PARSER_CREATION_FAILURE | back to summary |
|---|---|
| public static final String ERROR_PARSER_CREATION_FAILURE unable to create parser | |
| ERROR_SAX_1 | back to summary |
|---|---|
| public static final String ERROR_SAX_1 SAX1 not supported | |
| ERROR_TOO_MANY_DEFAULT_SCHEMAS | back to summary |
|---|---|
| public static final String ERROR_TOO_MANY_DEFAULT_SCHEMAS too many default schemas | |
| fullChecking | back to summary |
|---|---|
| private boolean fullChecking full checking of a schema | |
| MESSAGE_ADDING_SCHEMA | back to summary |
|---|---|
| public static final String MESSAGE_ADDING_SCHEMA adding schema | |
| schemaLocations | back to summary |
|---|---|
| private Map<String, SchemaValidate. map of all declared schemas; we catch and complain about redefinitions | |
| SchemaValidate | back to summary |
|---|---|
| public SchemaValidate() | |
| addConfiguredSchema | back to summary |
|---|---|
| public void addConfiguredSchema(SchemaValidate. add the schema
| |
| addSchemaLocations | back to summary |
|---|---|
| protected void addSchemaLocations() build a string list of all schema locations, then set the relevant property. | |
| createAnonymousSchema | back to summary |
|---|---|
| protected void createAnonymousSchema() create a schema location to hold the anonymous schema | |
| createDefaultReader | back to summary |
|---|---|
| protected XMLReader createDefaultReader() Overrides org. Create a reader if the use of the class did not specify another one.
The reason to not use | |
| enableJAXP12SchemaValidation | back to summary |
|---|---|
| public boolean enableJAXP12SchemaValidation() Set schema attributes in a JAXP 1.2 engine.
| |
| enableXercesSchemaValidation | back to summary |
|---|---|
| public boolean enableXercesSchemaValidation() Turn on XSD support in Xerces.
| |
| getNoNamespaceSchemaURL | back to summary |
|---|---|
| protected String getNoNamespaceSchemaURL() get the URL of the no namespace schema
| |
| init | back to summary |
|---|---|
| public void init() throws BuildException Overrides org. Called by the project to let the task initialize properly. The default implementation is a no-op.
| |
| initValidator | back to summary |
|---|---|
| protected void initValidator() Overrides org. init the parser : load the parser class, and set features if necessary It is only after this that the reader is valid
| |
| onSuccessfulValidation | back to summary |
|---|---|
| protected void onSuccessfulValidation(int fileProcessed) Overrides org. handler called on successful file validation.
| |
| setDisableDTD | back to summary |
|---|---|
| public void setDisableDTD(boolean disableDTD) flag to disable DTD support.
| |
| setFeatureIfSupported | back to summary |
|---|---|
| protected void setFeatureIfSupported(String feature, boolean value) set a feature if it is supported, log at verbose level if not
| |
| setFullChecking | back to summary |
|---|---|
| public void setFullChecking(boolean fullChecking) enable full schema checking. Slower but better.
| |
| setNoNamespaceFile | back to summary |
|---|---|
| public void setNoNamespaceFile(File defaultSchemaFile) identify a file containing the default schema
| |
| setNoNamespaceSchemaProperty | back to summary |
|---|---|
| private void setNoNamespaceSchemaProperty(String property) set nonamespace handling up for xerces or other parsers
| |
| setNoNamespaceURL | back to summary |
|---|---|
| public void setNoNamespaceURL(String defaultSchemaURL) identify the URL of the default schema
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | ERROR_NO_FILE
File not found |
| public static final String | ERROR_NO_LOCATION
No location provided |
| public static final String | ERROR_NO_URI
No namespace URI |
| public static final String | ERROR_NO_URL_REPRESENTATION
Cannot make URL |
| public static final String | ERROR_TWO_LOCATIONS
Both URL and File were given for schema |
| private File | |
| private String | |
| private String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true iff the objects are considered equal in valueobject to compare against o)Overrides java. |
| public File | |
| public String | |
| public String | |
| public String | Returns: string of uri and locationvalidate the fields then create a "uri location" string |
| public String | |
| public int | Returns: the hashcode.Overrides java. |
| private boolean | |
| public void | |
| public void | |
| public void | |
| public String | Returns: a string representation of the object.Overrides java. |
| public void |
| ERROR_NO_FILE | back to summary |
|---|---|
| public static final String ERROR_NO_FILE File not found | |
| ERROR_NO_LOCATION | back to summary |
|---|---|
| public static final String ERROR_NO_LOCATION No location provided | |
| ERROR_NO_URI | back to summary |
|---|---|
| public static final String ERROR_NO_URI No namespace URI | |
| ERROR_NO_URL_REPRESENTATION | back to summary |
|---|---|
| public static final String ERROR_NO_URL_REPRESENTATION Cannot make URL | |
| ERROR_TWO_LOCATIONS | back to summary |
|---|---|
| public static final String ERROR_TWO_LOCATIONS Both URL and File were given for schema | |
| file | back to summary |
|---|---|
| private File file | |
| namespace | back to summary |
|---|---|
| private String namespace | |
| url | back to summary |
|---|---|
| private String url | |
| SchemaLocation | back to summary |
|---|---|
| public SchemaLocation() | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. equality test checks namespace, location and filename. All must match, | |
| getFile | back to summary |
|---|---|
| public File getFile() Get the file.
| |
| getNamespace | back to summary |
|---|---|
| public String getNamespace() Get the namespace.
| |
| getSchemaLocationURL | back to summary |
|---|---|
| public String getSchemaLocationURL() get the URL of the schema
| |
| getURIandLocation | back to summary |
|---|---|
| public String getURIandLocation() throws BuildException validate the fields then create a "uri location" string
| |
| getUrl | back to summary |
|---|---|
| public String getUrl() The URL containing the schema.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Generate a hashcode depending on the namespace, url and file name.
| |
| isSet | back to summary |
|---|---|
| private boolean isSet(String property) check that a property is set
| |
| setFile | back to summary |
|---|---|
| public void setFile(File file) identify a file that contains this namespace's schema. The file must exist.
| |
| setNamespace | back to summary |
|---|---|
| public void setNamespace(String namespace) set the namespace of this schema. Any URI
| |
| setUrl | back to summary |
|---|---|
| public void setUrl(String url) identify a URL that hosts the schema.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string representation of the object for error messages and the like | |
| validateNamespace | back to summary |
|---|---|
| public void validateNamespace() assert that a namespace is valid
| |