Rational Developer for System z

XML attribute support limitation

This topic covers the limitations for XML attribute support.

XML attribute qualification and XMLPARSE(COMPAT) option

Since the Enterprise COBOL built-in XML parser, which is selected by specifying XMLPARSE(COMPAT), does not support XML namespaces, XML converters based on the COMPAT parser do not properly process qualified XML attributes.

Mixed content XML elements are not supported by XML2LS

XSD elements with mixed content may contain character data interspersed between child elements. Mixed content elements are most often used with freeform text such as letters and documents, and therefore are not particularly applicable to transaction-oriented language structures.

In Figure 1, the element deposit_detail has mixed content, a combination of elements and character data.

As shown in Figure 1, in the XML instance, the character content of the element deposit_detail is "This transaction was initiated online." Even though “mixed” content elements cannot be mapped using the Mapping Editor, if an element does have mixed content at runtime, the XML2LS conversion ignores the content and continues processing at the next mapped element.

Additional reasons for avoiding mixed content in Enterprise Web service interfaces:
Figure 1. Example of XML Attribute Support Limitation for Mixed Content XML Elements
XML Instance:
<deposit_detail>
  This transaction was initiated
  <deposit_transaction account_number=”1”
    currency_type=”USD”>123.45</deposit_transaction>
  online.
</deposit_detail> 

XML Schema:
<xs:element name=”deposit_detail” >
  <xs:complexType mixed=”true”>
    <xs:sequence>
    <xs:element ref=”deposit_transaction” minOccurs=”1” maxOccurs=”5” />
  </xs:sequence>
  </xs:complexType>
</xs:element>

Feedback