Table of Contents

Search

  1. Preface
  2. XML Concepts
  3. Using XML with PowerCenter
  4. Working with XML Sources
  5. Using the XML Editor
  6. Working with XML Targets
  7. XML Source Qualifier Transformation
  8. Midstream XML Transformations
  9. Appendix A: XML Datatype Reference
  10. Appendix B: XPath Query Functions Reference

XML Guide

XML Guide

Complex Types

Complex Types

A complex type aggregates a collection of simple types into a logical unit. For example, a customer type might include the customer number, name, street address, town, city, and zip code. A complex type can also reference other complex types or element and attribute groups.
XML supports complex type inheritance. When you define a complex type, you can create other complex types that inherit the components of the base type. In a type relationship, the base type is the complex type from which you derive another type. A derived complex type inherits elements from the base type.
An extended complex type is a derived type that inherits elements from a base type and includes additional elements. For example, a customer_purchases type might inherit its definition from the customer complex type, but the customer_purchases type adds item, cost, and date_sold elements.
A restricted complex type is a derived type that restricts some elements from the base type. For example, mail_list might inherit elements from customer, but restrict the phone_number element by setting the minoccurs and maxoccurs boundaries to zero.
The following figure shows derived complex types that restrict and extend the base complex type:
  1. Base complex type
  2. Extended complex type
  3. Restricted complex type
  4. Element reference
In the above figure, the base type is PublicationType. BookType extends PublicationType and includes the ISBN and Publisher elements. Publication_Minimum restricts PublicationType. Publication_Minimum requires between 1 and 25 Authors and restricts the date to the year.

0 COMMENTS

We’d like to hear from you!