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

Unions

Unions

A union is a combination of one or more atomic or list types that map to one simple type in an XML file. When you define a union type, you specify what types to combine. For example, you might create a type called size. Size can include string data, such as S, M, and L, or size might contain decimal sizes, such as 30, 32, and 34. If you define a union type element, the XML file can include a sizename type for string sizes, and a sizenum type for numeric sizes.
The following figure shows a schema file containing a shoesize union that contains sizenames and sizenums lists:
sizename is a restricted string type. The sizenames type accepts a list of strings. The sizenums type accepts a list of decimals. The shoesize union accepts both the decimal and strings lists.
  1. Sizename is a restricted string type.
  2. The sizenames type accepts a list of strings.
  3. The sizenums type accepts a list decimals.
  4. The shoesize union accepts both the decimal and string lists.
The union defines sizenames and sizenums as union member types. Sizenames defines a list of string values. Sizenums defines a list of decimal values.

0 COMMENTS

We’d like to hear from you!