Example: Consolidated Schema Document - Advanced SQL Engine - Teradata Database

XML Data Type

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
amr1556233250442.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1140
lifecycle
previous
Product Category
Teradata Vantageā„¢

The following is a sample consolidated schema document:

<?xml version="1.0" encoding="UTF-8"?>
<ConsolidatedSchema
   schemaURI="http://www.example.com/schemauri" >
   <ComponentSchema locationURI="http://example.com/schemauri"
      targetNamespace="http://www.example.com/tns">
      <xs:schema xmlns:xs="..." xmlns:xsi="..."
         xmlns:tns="http://www.example.com/tns">
      ....
      </xs:schema>
   </ComponentSchema>
   <ComponentSchema locationURI="http://www.example.com/includedschema1.xsd"
      targetNamespace="http://www.example.com/tns">
      <xs:schema xmlns:xs="..." xmlns:xsi="..."
         xmlns:tns="http://www.example.com/tns">
      ....
      </xs:schema>
   </ComponentSchema>
   <ComponentSchema locationURI="../otherschema/importedschema1.xsd"
      targetNamespace="http://www.example.com/tns2">
      <xs:schema xmlns:xs="..." xmlns:xsi="..."
         xmlns:tns2="http://www.example.com/tns2">
      ....
      </xs:schema>
   </ComponentSchema>
</ConsolidatedSchema>

The ConsolidatedSchema element represents the envelope which will contain the individual schema documents that make up the schema. It identifies the schema in question through a schemaURI attribute, making it a complete self-identifying package.

The ComponentSchema element, which is a child of the ConsolidatedSchema element, will wrap each individual schema document that makes up the schema grammar. This element contains a locationURI attribute that is used to pick out the schema document when it is required during the processing of the root schema. For example, if a schema with a given location URI is imported in the root schema or one of the other imported/included schemas, the resolver will pick the ComponentSchema element with the appropriate locationURI attribute and take its xs:schema child element.