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

Importing Metadata from a DTD File

Importing Metadata from a DTD File

A DTD file provides constraints on a XML document structure. A DTD file lists elements, attributes, entities, and notations for an XML document. A DTD file specifies relationships between components. A DTD specifies cardinality and null constraint. However, a DTD file does not contain any data or datatypes.
When you import a DTD file, you can change the datatypes for the elements in the XML definition. You can change the null constraint, but you cannot change element cardinality.
If you import an XML file with an associated DTD, the Designer creates a definition based on the DTD structure.
The following figure shows an example of an XML file where StoreInfo.dtd contains the Store element and Product is one of the child elements of Store:
The following figure shows the associated DTD:
In the associated DTD, ProductInfo.xml, uses the Product element from StoreInfo.dtd. Product includes the multiple-occurring Sales element.
The following figure shows the source definition that the Designer creates:
The XML definition includes the properties Name, XPath, and Datatype. The Name and XPath properties list the product and sales group data. The Datatype property lists the multiple-occurring elements, such as xsd:integer, xsd:string, and xsd:decimal.
The ProductInfo definition contains the Product and Sales groups. The XML file determines what elements to include in the definition. The DTD file determines the structure of the XML definition.

0 COMMENTS

We’d like to hear from you!