Requirements for business object definitions

To ensure that business object definitions conform to the requirements of the XML data handler, use the guidelines in this section, which involve:

A properly-constructed business object definition ensures that the data handler can correctly convert a business object to an XML document and an XML document to a business object. For information on how to create business objects for the XML data handler, see Creating business object definitions from DTDs.

Business object structure

To represent a DTD or schema document requires at least two business object definitions:

A business object that is processed by the XML data handler using business object definitions from DTDs or schema documents must follow these additional rules:

Note:
A business object must contain enough data so that the XML data handler can create a valid XML document. Avoid sending the data handler business objects without data.

This document provides the following information about the structure of business object definitions for DTDs and schema documents:
Data model For more information
Document type definition (DTD) Business object structure for DTDs
Schema document Business object structure for schema documents

Business object attribute properties

Business object definitions define attributes. Each attribute has various properties that provide information about the attribute. This section describes how the XML data handler interprets several of these properties and describes how to set them when modifying a business object definition.

Name attribute property

Each business object attribute must have a unique name. The attribute name must exactly match the name of an XML element or attribute, unless the XML element or attribute contains special characters (such as periods or hyphens). In this case, the name of the XML element (or attribute) specified in the elem_name (or attr_name) tag of the attribute application-specific informatin contains the special characters. However, the name of the business object attribute (which does not allow these special characters) omits them.

Type attribute property

Each business object attribute must have a type, such as Integer, String, or the type of a contained child business object, as follows:

Note:
All simple attributes should be of type String

Key and Foreign Key attribute properties

Each business object must have at least one primary key attribute, which is specified by setting the Key property to true for an attribute. The setting of the Foreign Key property is optional and depends on the structure of the XML document. This section provides the following information about the Key and Foreign Key attribute properties:

Designating the key in the business object definition

In earlier versions of XML-business-object-definition-generation tools (such as XMLBorgen, Edifecs SpecBuilder, and the XML ODA), the generation tool designated the ObjectEventId attribute as the key of a parent XML business object. However, as of this release, Business Object Designer Express no longer allows you to save a business object definition that has the ObjectEventId attribute specified as a key.

Because of this restriction, the current version of XML ODA now takes the following actions:

To provide a key to a parent business object definition that the XML ODA generates, you must bring up the business object definition in Business Object Designer Express and analyze your business object definition to determine the appropriate attribute to designate as the key. You must change the business object definition's key attribute before you can save the business object definition in Business Object Designer Express.

Note:
The XML ODA replaces earlier XML-business-object-definition-generation tools (such as XMLBorgen and Edifecs SpecBuilder). Therefore, only the XML ODA takes these special steps to avoid assignment of the ObjectEventId as the parent business object's key attribute. If you have existing XML business object definitions that you have generated with any earlier XML-business-object-definition-generation tools (including an earlier version of the XML ODA), these business object definitions might still use ObjectEventId as a key. You should analyze these business object definitions if you are migrating their business objects to the current release. Failure to set an appropriate key attribute in your business object definition can have a negative impact on the performance of the event sequencing feature.

Handling keys and "required-ness"

This document provides the following information about the relationship between keys and "required-ness":
Data model For more information
Document type definition (DTD) Business object attribute properties for DTDs
Schema document Business object attribute properties for schema documents

Required attribute property

If this property is specified for an attribute that contains a single-cardinality child business object, the XML data handler requires that the parent business object contain a child business object for this attribute. The settings of the Cardinality, Key, and Foreign Key attribute properties can affect the setting an attribute's Required property.

This document provides the following information about "required-ness":
Data model For more information
Document type definition (DTD) Business object attribute properties for DTDs
Schema document Business object attribute properties for schema documents

Cardinality attribute property

The Cardinality property indicates the number of child business objects allowed in an attribute that has a business object definition as its type. The setting of this property depends on the structure of the XML document and its elements. Its setting also affects whether the attribute must be required (its Required property set to true).

This document provides the following information about the relationship between cardinality and "required-ness":
Data model For more information
Document type definition (DTD) Business object attribute properties for DTDs
Schema document

Special attribute values

A business object attribute has a value whose type matches the attribute's Type property. In addition, an attribute can have either of two special values:

Application-specific information

Application-specific information in business object definitions provides the data handler with instructions on how to convert business objects to XML documents. The application-specific information enables the data handler to process the business object correctly. Therefore, if you create new business objects or modify existing business objects for the XML data handler, make sure that the application-specific information in the business object definition matches the syntax that the data handler expects. The XML data handler can use the following kinds of application-specific information:

Note:
The XML data handler uses application-specific information to match components of an XML document with attributes in a business object. The maximum length for application-specific information is 255 characters. If the value of the application-specific information is more than 255 characters, you must reconstruct your DTD or schema document, and then regenerate the business object.

This document provides the following information about application-specific information:
Data model For more information
Document type definition (DTD) Application-specific information for XML components in DTDs
Schema document Application-specific information for XML compnents in schema documents

Business object verbs

When converting business objects to XML documents, the XML data handler does not generate XML for the verb, nor does it set a verb when converting an XML document to a business object. However, verb information can be preserved in one of these ways:

Copyright IBM Corp. 1997, 2003