Arbortext Command Language > Functions by Alphabetical Listing > schema_validate_batch
  
schema_validate_batch
schema_validate_batch(schema[, doc[, flag]])
Validates a document against a non-namespaced schema.
schema — The path and file name of a non-namespaced schema definition (XSD) file.
doc — The document to validate against schema. If not specified, the current document is used.
flag — Enables you to control how the doc is validated against the schema. The following flags are available:
1 — Check identity constraints.
2 — Check entities.
4 — Check the document structure, including content and data types.
8 — Check attribute values.
16 — Report errors.
32 — Define how to report errors.
If set, either a list of errors or a message saying that there are no errors is written to an event log document. The event log can be retrieved by calling the ACL function get_schema_log_doc(), which will return the document ID as an integer. Use the document ID to inspect the content of the document, write it to disk, display it, or carry out manipulations as with an open document.
If not set, any schema errors are reported in the same way as errors reported by a completeness check. Errors are reported in a popup Parser Messages window. If there are no errors, no window is displayed.
64 — Fall back to the schema associated with doc, if the specified schema is not available or does not contain element definitions that occur in doc.
By default, the function checks all of these areas and reports errors (not to the buffer). If you only want to validate one or more of these areas, set the appropriate flag or flags. Add the flag values to set multiple flags. For example, to just check identity constraints and the document structure, set flag to 5 (1 + 4).
The function returns one of the following values:
0 — The validation failed.
1doc is valid.
All schema_validate_batch results are shown in the event-log document. Refer to schema_validate for similar functionality.
Related Topics
ns_schema_validate_batch