XMLVALIDATE Function | XML Data Type | Teradata Vantage - 17.10 - XMLVALIDATE - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - XML Data Type

Advanced SQL Engine
Teradata Database
Release Number
July 2021
Last Update
Content Type
Programming Reference
Publication ID
English (United States)
Last Update

Validates the XML type instance using the specified XML schema.

XMLVALIDATE uses the XML schema argument to validate the XML type instance. You can optionally specify the actual element declaration to be used for validation. The validation is basically an evaluation of the XQuery expression:

validate strict {$seq}

where $seq is a sequence containing the items to be validated (that is, the sequence returned by the XML_value_expr).

ANSI Compliance

ANSI SQL/XML supports an optional ACCORDING TO XMLSCHEMA clause that allows you to specify the schema to use for validation of the XML type instance. The schema is identified either through a URI reference or through the registered schema ID. If the clause is not specified, the schema to be used for validation is determined from the namespace of the value being validated (the registered schemas are searched for a schema with a matching target namespace and if one is found, it is used for validation).

Vantage does not support schema registration; therefore, the ACCORDING TO XMLSCHEMA clause is required and you must specify a schema.

Result Type

The result is a copy of the original XML type instance with type annotations added as a result of the validation. Type annotations are made on the internal representation of the XML and are not visible to the user.