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

Atomic Types

Atomic Types

An atomic datatype is a basic datatype such as a Boolean, string, integer, decimal, or date. To define custom atomic datatypes, add restrictions to an atomic datatype to limit the content. Use a facet to define which values to restrict or allow.
A facet is an expression that defines minimum or maximum values, specific values, or a data pattern of valid values. For example, a pattern facet restricts an element to an expression of data values. An enumeration facet lists the legal values for an element.
The following example contains a pattern facet that restricts an element to a lowercase letter between a and z:
<xs:element name="letter">    <xs:simpleType>    <xs:restriction base="xs:string">       <
xs:pattern value="[a-z]
"/>    </xs:restriction> </xs:simpleType></xs:element>
The following example contains an enumeration facet that restricts a string to a, b, or c:
<xs:element name="letter">    <xs:simpleType>    <xs:restriction base="xs:string">       <
xs:enumeration value="a"/>
      <xs:enumeration value=”b”/>       <xs:enumeration value=”c”/>    </xs:restriction> </xs:simpleType></xs:element>

0 COMMENTS

We’d like to hear from you!