XML for Data Architects: Designing for Reuse and Integration

Applying a Data Type using W3C XML Schema Syntax

When data are exchanged between platforms, application systems, and database products, mapping of data types is a critical activity. Use of XML and W3C XML Schemas to describe an exchange or integration transaction can provide much needed support. As we have learned, the XML document instance contains data values. A schema describes metadata characteristics, rules, and constraints that are applied to the XML document during the parser validation process. One of the checks completed during the parser validation process is to compare the data values in the XML document with the data type declarations found in the schema.

The method of applying a W3C XML Schema data type differs from more traditional metadata declarations such as Data Definition Language (DDL). The basic syntax for applying a W3C XML Schema data type to an XML element or attribute is "type='datatype'," where "datatype" is one of the supported W3C XML Schema types (e.g., "integer," "date," "dateTime," "decimal," "boolean," or other). This basic form can also be extended to apply other related metadata constraints such as length limitations. Simply applying an intrinsically supported data type to an XML element or attribute is but one possible technique. A custom data type declared within a W3C XML Schema applies one or more restrictions to a built-in or derived data type. Additional restrictions or constraints are applied using data type facets such as a length, minimum or maximum value, list of allowable values, or pattern (Listing 4.1).

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Data Warehousing Software
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.