Kbase P149144: SAX Parser is not using XSD file to validate XML
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  07/07/2009 |
|
Status: Unverified
SYMPTOM(s):
SAX Parser is not using XSD file to validate XML
SAX Parser is not generating validation errors when XML file does not match XSD definitions
SAX Parser parses the XML file but does not generate validation errors
FACT(s) (Environment):
XML file references XSD file via xsi:noNamespaceSchemaLocation entry
XML contains purposely added errors
Setting NONAMESPACE-SCHEMA-LOCATION and/or ADD-SCHEMA-LOCATION makes no difference
Setting VALIDATION-ENABLE to TRUE makes no difference
DOM Parser generates validation errors with same XML file
OpenEdge 10.1x
OpenEdge 10.2x
All Supported Operating Systems
CAUSE:
The SAX Parser's Error callback procedure has not been configured so validation errors are not returned
FIX:
Add an Error callback procedure for the SAX Parser and add error-handling code:
PROCEDURE Error: /* Invoked to report an error encountered by the parser while parsing the XML document. */
DEFINE INPUT PARAMETER errMessage AS CHARACTER.
END PROCEDURE.