Validation task
|
Required action
|
Disable DTD validation
|
Set the VALIDATION-ENABLED attribute of the SAX-reader object to FALSE. All DTDs will be ignored.
|
Enable DTD validation
|
Set the VALIDATION-ENABLED attribute of the SAX-reader object to TRUE. If the parser does not find a DTD, the parse fails. Validation errors are caught in a callback event procedure named error. If this callback procedure is not implemented, then validation errors cannot be caught.If the DTD is not included within the parsed XML document, provide the DTD location by setting the SCHEMA-PATH attribute of the SAX-reader object. If this attribute is set, DTDs found or referenced from within the XML document are ignored in favor of the specified DTD.
|
Disable XML Schema validation
|
Set the SCHEMA-LOCATION and NONAMESPACE-SCHEMA-LOCATION attributes to the empty string ("").
Note: XML documents may refer to the schemas to which they must conform using an xsi:schemaLocation attribute and/or an xsd:noNamespaceSchemaLocation attribute. If the XML document does include these references, setting these SAX-reader attributes to the empty string ("") does not disable validation against the referenced schemas.
|
Enable XML Schema validation
|
Specify the location of one or more XML Schema documents with the SCHEMA-LOCATION attributes and/or the NONAMESPACE-SCHEMA-LOCATION attribute of the SAX-reader object.
|
Enable both DTD and XML Schema validation
|
Set the VALIDATION-ENABLED attribute to TRUE and provide valid SCHEMA-PATH. Specify the location of one or more XML Schema documents with the SCHEMA-LOCATION attribute and/or the NONAMESPACE-SCHEMA-LOCATION attributes of the SAX-reader object.
|