Syntax FACTORY_DEF * XMLValidationFactory [FACTORY_NAME ] [INPUT FEATURE_TYPE [ ]* []*]* [MODE (NONE|SYNTAX|SCHEMA)] [XML_FILE | XML_TEXT | XML_TEXT_ATTR ] ([EXTERNAL_SCHEMA_LOC ]) [LIST_ATTR ] [ERRORS_COUNT_LIMIT ] [OUTPUT (PASSED|FAILED) FEATURE_TYPE [ ]* []*]* Overview This factory validates the syntax or schema of an XML file or text and record any warnings or errors that occur as a list attribute. There are different ways to specify the XML source to be validated: specifying the location of the file (local, network or web URL) using the XML_FILE clause, the encoded text using the XML_TEXT clause or using the XML_TEXT_ATTR to specify the attribute on features that contains the text to be validated. The MODE clause controls what kind of validation is performed on the input. If NONE is specified, then no validation is performed and the features are output through the PASSED port. If SYNTAX is specified, then only the syntax of the input is validated. If SCHEMA is specified, then the input is validated against the schema specified in the input on top of the syntax validation. In the cases where the input fails the validation, the factory will tag on the list of errors and warnings on the feature as a list attribute specified in LIST_ATTR clause. The following elements are added to the list that further describes the errors or warnings (assuming listName is the attribute list specified in this clause): listName{}.type, listName{}.file , listName{}.line, listName{}.col and listName{}.desc. Optionally, number of errors and warnings that are reported per feature can be limited by using the ERRORS_COUNT_LIMIT clause. Optionally, an external schema file location can be specified using the EXTERNAL_SCHEMA_LOC. The schema file that is specified here only serves its purpose if the validation type is SCHEMA and the factory does not find the schema files locally or using the entries in URI Map. Clauses XML_FILE The file path of the XML file used in the validation. This can be specified as either local file, network file or web URL Default: None Example: XML_FILE "someFile.xml" XML_TEXT_ATTR Specifies the input attribute name that contains the XML text Default: None Example: XML_TEXT_ATTR xml_string XML_TEXT XML text to be validated. Default: None Example: XML_TEXT "?xmlversion=1.0encoding=UTF-8?" MODE (NONE|SYNTAX|SCHEMA) Specifies the type of validation to be performed. None: no validation is performed Syntax: the syntax of the input is validated Schema: the syntax of the input is validated as well as validated against the schema Default: None EXTERNAL_SCHEMA_LOC Specifies the location of the schema file if MODE is SCHEMA. It is not guaranteed that this schema file is used if the factory can find it in local directory or entries in URIMap. Default: None Example:EXTERNAL_SCHEMA_LOC "someSchema.xsd" LIST_ATTR Specifies the list attribute to be added to features that fail the validation. The elements of the list describes the error or warnings with more details Default: no Example: LIST_ATTR _xml_error ERRORS_COUNT_LIMIT Specifies the maximum number of errors and warnings reported per feature Default: -1 Example: ERRORS_COUNT_LIMIT 100 Output Tags The XMLValidationFactory supports the following output tags. PASSED Features that pass the validation will be output through this tag INVALID Features that fail the validation will be output through this tag with LIST_ATTR list attribute added to the features explaining the errors or warnings