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. XML Datatype Reference
  10. XPath Query Functions Reference

XML Guide

XML Guide

Defining a Type Relationship

Defining a Type Relationship

The following schema defines BillToAddress and ShipToAddress. BillToAddress is an AddressType, and ShipToAddress is a USAddressType. USAddressType extends AddressType.
<xsd:sequence>   <xsd:element name="Street" type="xsd:string" />   <xsd:element name= "City" type="xsd:string" />   <xsd:element name="State" type="xsd:string" />   <xsd:element name="Zip" type="types:ZIPType" />   <xsd:element name="Country" type="xsd:string" /> </xsd:sequence> </xsd:complexType>   <xsd:complexType name="USAddressType">     <xsd:complexContent>     <xsd:extension base="AddressType">       <xsd:sequence>       <xsd:element name="PostalCode" type="xsd:string" minOccurs="0"/>       <xsd:sequence>     </xsd:extension>     </xsd:complexContent> </xsd:complexType> <xsd:element name="BillToAddress" type="AddressType" /> <xsd:element name="ShipToAddress" type="USAddressType" />
The following figure shows a type relationship in the XML definition with the PartInvoice view showing the BillToAddress element in the X_par_PartInvoice XML view and the related X-par_AddressType XML view below:
The PartInvoice view contains invoice data. The view includes a BillToAddress. The type relationship in the XML definition is between BillToAddress and AddressType.
To limit the AddressType data to BillToAddress, select the X_par_PartInvoice view in the XML Editor workspace. Choose the Type Relationship Row option. When you run a session, the Integration Service generates Address rows for BillToAddress but not ShipToAddress. ShipToAddress is not in the type relationship.

0 COMMENTS

We’d like to hear from you!