XMLVALIDATE Function | XML Data Type | VantageCloud Lake - XMLVALIDATE - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

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.