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

XML Data Type

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-28
dita:mapPath
kxe1590704060061.ditamap
dita:ditavalPath
kxe1590704060061.ditaval
dita:id
B035-1140
lifecycle
previous
Product Category
Teradata Vantageā„¢

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.