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

DTD Attributes

DTD Attributes

Attributes provide additional information about elements. In a DTD file, an attribute occurs inside the starting tag of an element.
The following syntax describes an attribute in a DTD file:
<!ATTLIST element_name attribute_name attribute_type “default_value”>
The following parameters identify an attribute in a DTD file:
  • Element_name
    . The name of the element that has the attribute.
  • Attribute_name.
    The name of the attribute.
  • Attribute_type.
    The kind of attribute. The most common attribute type is CDATA. A CDATA attribute is character data.
  • Default_value.
    The value of the attribute if no attribute value occurs in the XML file.
    Use the following options with a default value:
    • #REQUIRED.
      The XML file must contain the attribute value.
    • #IMPLIED.
      The attribute value is optional.
    • #FIXED.
      The XML file must contain the default value from the DTD file. A valid XML file can contain the same attribute value as the DTD, or the XML file can have no attribute value. You must specify a default value with this option.
      The following example shows an attribute with a fixed value:
      <!ATTLIST product product_name CDATA #FIXED “vacuum”>
      The element name is product. The attribute is product_name. The attribute has a default value, vacuum.

0 COMMENTS

We’d like to hear from you!