Importing and exporting IBM Content Manager data model objects as XML schema files (XSD)

The XML instance service class, DKXMLSysAdminService, contains two methods for importing and exporting IBM Content Manager metadata: ingest() and extract(). These methods import and export storage schemas (XSD files) for data model objects.

The DKXMLDOMObjectDefs class provides two methods, getSysAdminDefs() and getDataModelDefs(), to retrieve the exported data model objects (in XML schema format) and administrative objects (in XML format) separately. The DKXMLExportList class can specify which XML objects to export.

Generally, the following rules apply when your storage schema is imported into IBM Content Manager:
  • A root element declaration (for example, an insurance policy) is mapped to an XYZ_InsPolicy item type.
    <xsd:element name=“XYZ_InsPolicy”>
  • A child element declaration (for example, a vehicle identification number) is mapped to an XYZ_VIN component type under the corresponding parent component type (in this example, the XYZ_InsPolicy root component type).
    <xsd:element maxOccurs=“unbounded” minOccurs=“0” name=“XYZ_VIN”>
  • An attribute inside of an element declaration is mapped to an attribute in the corresponding component (for example, a policy's ID number attribute maps to an XYZ_PolicyNum attribute in the policy item type).
    <xsd:attribute name=“XYZ_PolicyNum”>
  • In accordance with the SQL/XML standard for mapping SQL identifiers to XML names, the XML schema converter automatically escapes special characters with the Unicode equivalent (in the form of _xYYYY, where YYYY represents the Unicode string). For example:
    • Elements and attribute names cannot start with the letters XML. Therefore, if an item type is named XMLDocument, then its new name becomes: _x0058_MLDocument.
    • Elements and attributes names cannot contain spaces. Therefore, if an entity is named Project Entity, then its new name becomes: Project_x0020_Entity.
    For a complete list of valid characters in XML, see the XML standard at http://www.w3.org/TR/REC-xml#NT-Name.

The exported schema for a data model object is semantically equivalent to the imported schema that creates it. That is, by exporting and importing an object from one system to another system, all of the imported object's properties remain the same as those original exported one. However, the exported schema document and the imported schema document might differ in syntax because of the many different ways for XML schema to represent the same information.

IBM Content Manager defines the storage schema by using the following steps:
  1. IBM Content Manager attempts to map any available construct or feature in the XML schema to an IBM Content Manager data model concept, as shown in the following table.
  2. If no IBM Content Manager concept directly corresponds to the XML schema, then the concept is instead represented by a comment (also known as an XML annotation) as shown in the following table.
  3. IBM Content Manager instances (for example, item-level ACLs and semantic types) are represented as XML elements (in the IBM Content Manager namespace) imported from the cmdatamodel.xsd file. These are shown in the following table.
Table 1. How IBM Content Manager data model objects map to the storage schema constructs
Object Data type Required Corresponding storage schema construct Comments
Attributes (global)     This represents an XML attribute in XML schema. For example: <attribute name=“..” type=“..”/> It is a global attribute declaration. Local attributes are described in the component type section.  
-Name string Yes This represents an attribute name in the attribute declaration. For example: <attribute name=“XX” type=“..”/>  
-Type (possible type as follows) short Yes This either maps to the built-in primitive and derived types, or with annotation. The attribute's type is character, var char, short, long, and so on.
--Character:     This represents the derived string simple type definition with the minLength and maxLength constraints. For example: <simpleType name=“char_100”> <restriction base=“string”> <length value=“100” /> </restriction> </simpleType> Note that minLength and maxLength must be the same. There is one simple type definition per each attribute type instance with different length. The simpleType is tied to the attribute declaration in the export file. During import, the simpleType definition can be declared globally or inside the attribute declaration. The same definition can be reused. Since the same attribute can exist in different item or components with different properties (such as length, nullable), it might not be possible to reference the global attribute declaration. As a result, the component has its own local attribute declaration. During the import, the XML Services API compares the definition and checks whether there is any conflict. The length can be specified.
--alphabetic     You can use the pattern element in the restriction to enforce the type. For example: <simpleType name=“alpha_char_100”> <restriction base=“string”> <pattern value=“[a-zA-Z]*”/> <length value=“100”/> </restriction> </simpleType>  
--numeric        
--alphanumeric        
--Extended alphanumeric        
--other        
-Variable character     This represents the derived string simple type definition with the minLength and maxLength constraints. For example, <simpleType name=“varchar_0,256”> <restriction base=“string”> <minLength value=“0”/> <maxLength value=“256”/> </restriction> </simpleType> The minimum and maximum length can be specified.
--alphabetic        
--numeric        
--alphanumeric        
--Extended alphanumeric        
--other        
-Short integer     This represents the short built-in derived type. This is a specific minimum and maximum value.
-Long integer     This represents the integer built-in derived type. This is a specific minimum and maximum value.
-Double     This represents the double built-in primitive type.  
-Decimal     This represents the decimal built-in primitive type. This is a specific length and fixed places.
-Date     This represents the date built-in primitive type with facet value conversion (convert into the facet format, which is understood by Content Manager and Db2®).  
-Time     This represents the time built-in primitive type.  
-Timestamp     This represents the dateTime built-in primitive type with facet value conversion.  
-BLOB     A regular string simple type with a CM meta-attribute namespace. For example: <attribute name=“..” type=“base64Binary”> <annotation><appinfo> <CM:data type value=“BLOB”/> </appinfo> </annotation> </attribute> The length can be specified.
-CLOB     This maps to a regular string simple type with a CM meta-attribute namespace. For example: <attribute name=“...” type=“string”> <annotation><appinfo> <CM:datatype value=“CLOB”/> </appinfo></annotation> </attribute> The length can be specified.
-max integer   The maxInclusive element in the derived simple type definition. For example: <simpleType name=“integer_max100”> <restriction base=“integer”> <maxInclusive value=“100”/> </restriction> </simpleType> This creates a new type. IBM Content Manager associates a property with the attribute. This is for short and integers only.
-min integer   The minInclusive element in the derived simple type definition. For example: <simpleType name=“integer_min10” > <restriction base=“integer”> <minInclusive value=“10” /> </restriction> </simpleType> This is for short and integer only.
-length integer   The length element in the derived simple type definition. For example: <simpleType name=“char_256”> <restriction base=“string”> <length value=“256”/> </restriction> </simpleType>  
-scale/precision integer   The fractionDigits and totalDigits elements in the derived simple type definition. For example: <simpleType name=“decimal_8,3”> <restriction base=“decimal”> <fractionDigits value=“3”/> <totalDigits value=“8”/> </restriction> </simpleType> This is for decimals only.
Attribute groups (global)     The attributeGroup element in the XSD. For example: <xs:attributeGroup name=“myAttrGrp”> <xs:attribute .../> ... </xs:attributeGroup>  
-Name string Yes The name attribute in the attributeGroup element. For example: <xs:attributeGroup name=“myAttrGrp”> <xs:attribute .../> ... </xs:attributeGroup>  
-Attributes array of string yes The child elements of the attributeGroup element. For example, <xs:attributeGroup name=“myAttrGrp”> <xs:attribute .../> ... </xs:attributeGroup> The attribute name has the attribute group name as the prefix. This is consistent with how it is done in the CM. For the data instance, the attribute name is the combination of both the attribute group name and the attribute name. For example, myAttrGrp.myStringAttr. The is the array of attribute names.
Reference attribute     This maps to a string attribute with a specific XML schema annotation. In the CM data model, reference attribute is mapped to an attribute group definition because it comes with few internal attributes; however, it does not match the data model. So instead of modeling it as an attributeGroup in XSD, you map it to a regular attribute.  
-Name string yes Maps to the attribute name.  
Item Type: definition     A global element definition, with xs:schema element as the parent. For example: <xs:schema ....> <xs:element name=“elem1”> .... </xs:element> </xs:schema> It also has a similar XML Schema structure as the “Component Type Definition” because an item type is a component type that is based on the IBM Content Manager data model.  
-Name string yes The name attribute in the xs:element declaration. For example: <xs:schema ....> <xs:element name=“elem1”> .... </xs:element> </xs:schema>  
-Properties     Add an optional element definition immediately following the root element for describing any instance-level property. It refers the element that is defined in the cmdatamodel.xsd schema file. For example: <element ref=“cm:properties” minOccurs=“0” maxOccurs=“unbounded”> Use in the item instance to describe any instance-level properties that are associated with the item, such as semantic type, ACL, creation time.
-Resource Object     Add an optional element definition immediately following the root element for describing any resource content that is associated with the item. It refers the element that is defined in the cmdatamodel.xsd schema file. This element reference exists only if the element definition is describing a resource item type or a part item type. <element re=“cm:resourceObj” minOccurs=“0” maxOccurs=“unbounded”> Use in the item instance to describe any resource content that is associated with the item.
-Embedded Link object     Add an optional element definition immediately following the root element for describing any inbound and outbound links in the instance level. It refers the element that is defined in the cmdatamodel.xsd schema file. This element reference exists only if the element definition is describing an item type, a resource item type, or a document item type. <element ref=“cm:links” minOccurs=“0” maxOccurs=“unbounded”> Use in the item instance to describe all the inbound and outbound links.
Item type classification
  • Non-resource item
  • Resource item
  • Document item type
short     Represents the item, resource item, document, or document part. Use the ItemTypeRelation DefICM to represent relationships to the part.
-Part type name string, int   Add an optional element to the root element to reference the defined PART element declaration. For example: <element ref=“cm:ICMBASE” minOccurs=“0” maxOccurs=“unbounded”> The part element definition includes the <cm:referencedOnly> annotation element if the part item type is not part of the export list.  
-Text searchable /option        
-ACL name string,int      
-RM name string,short      
-SMS coll name string, short      
-New version policy short     This never creates, always creates, or the user chooses
4. Document part type     This represents a root element declaration (an item type). Such root element can be referred only by a document type. No XML instance can be based on this document type.  
Component Type:     This maps to an element declaration in XML schema. If the definition exists in a stand-alone fashion (it means that it does not associate with any itemType), it maps to a root element declaration in the XML schema with a cm:entityType element with value=“component”. Mostly non-root element--children of another element. This would be root element if there is no item type definition it corresponds to. This accepts only “sequence”, but not “all”, “choice” and nested particle. The IBM Content Manager data model does not track the instance order.  
-Attribute groups     This maps to XSD attribute group definition with “ref=” to the global attribute group definition. The global attribute group definition includes the name: <component type name>.<attribute group name>. The global attribute group definition includes the <cm:referencedOnly> annotation element to distinguish it from the exported global attribute group.  
-Reference attributes     This maps to XSD attribute use. It has the same local definition as the global reference attribute definition.  
-Attributes     This maps to XSD attribute use. The local attribute has its own type definition and annotation. It uses all the type definition and annotations that are described in the global attribute, which applies to local.  
-Is required boolean   This represents the used attribute name in the attribute declaration. For example: <xsd:attribute name=“..” use=“required” .../> Here is how you map the value of nullable attribute to the “use” and “default” attribute. “nullable” --> use=“optional” “non-nullable w/o default” --> use=“required” “non-nullable w/ default” --> use=“optional” default=“X”  
-Max value integer   This defines a new simpleType with a new maximum value, such as the maxInclusive element in the derived simple type definition. For example: <simpleType name=“integer_max100”> <restriction base=“integer”> <maxInclusive value=“100”/> </restriction> </simpleType>  
-Min value integer   This represents the minInclusive element in the derived simple type definition. For example: <simpleType name=“integer_min10”> <restriction base=“integer”> <minInclusive value=“10”/> </restriction> </simpleType>  
-Default value string   This represents the default attribute in the attribute declaration. For example: <xsd:attribute name=“..” default =“10” ... />  
Subcomponents / child components     This maps to a child element declaration (by using sequence) with the min and maximum occurrence of a child component mapped to the minOccur and maxOccur of the element declaration.  
Item Type View:     This maps to a root element definition. The item type view definition shares the same definition as item type definition with the annotations marked only with scope = “VIEW”. It also inherits the definition of the component type view because an item type view itself is a component type view. This performs projection, not selection.
Component Type View:     This maps to a child element definition of the item type view definition. It has the same hierarchy structure as component type definition. For example, example it contains attributes, attribute groups and subcomponents. This performs projection, not selection.
-Attributes     Use the same representation as the regular attribute definition in component type.  
Entity     This maps to a root element definition Since this is an entity, it cannot contain any subelement.  
-name string yes The name attribute in the xs:element declaration. For example: <xs:schema ....> <xs:element name=“elem1”> <xs:annotation><xs:appinfo> <xs:entityType value=“federated”/> </xs:appinfo></xs:annotation> .... </xs:element> </xs:schema>  
-Text searchable boolean      
-Enabled creating the native folder boolean      
-Attribute:     This maps to an XSD attribute declaration within the element.  
--name string   The name attribute in the xs:attribute declaration. For example: <xs:schema ....> <xs:element name=“elem1”> <xs:annotation><xs:appinfo> <xs:entityType value=“federated”/> </xs:appinfo></xs:annotation> <xs:complexType> <xs:attribute name=“attr1”...> .... </xs:element> </xs:schema>  
--datatype and other attribute information, such as length, precision, scale, max, min, nullable, queryable, writeable     Use the same definition as in the attribute category, but some representation is not there (such as the text-searchable information).  
-Fed entity name string      
-Fed attr name string      
-Native server name string      
-Native server type string      
-Native entity name string      
For Table 2, the Scope of the annotation can have the following definitions:
GLOBAL
The annotation applies if the property belongs to a global definition or declaration.
LOCAL
The annotation applies if the property belongs to a local declaration.
VIEW
The annotation applies only if the property belongs to a declaration which is part of the ITEM TYPE VIEW.
Table 2. How IBM Content Manager data model objects map to annotations in the storage schema
Object Information specified in annotation Scope of the annotation Instance-level information
Attributes (global)      
-Type (possible type as follows)      
--Character:      
--alphabetic You use the element cm:stringType with a value attribute in enumeration type {ALPHA, NUMERIC, ALPHANUMERIC, ALPHANUMERIC_EXT, OTHER}, to represent the value. Putting the pattern element is optional. In this case, <cm:stringType value=“ALPHA”/> GLOBAL, LOCAL, VIEW  
--numeric <cm:stringType value=“NUMERIC”/> GLOBAL, LOCAL, VIEW  
--alphanumeric <cm:stringType value=“ALPHANUMERIC”/> GLOBAL, LOCAL, VIEW  
--Extended alphanumeric <cm:stringType value=“ALPHANUMERIC_EXT”/> GLOBAL, LOCAL, VIEW  
--other <cm:stringType value=“OTHER”/> GLOBAL, LOCAL, VIEW  
-Variable character      
--alphabetic Same as in the Character case <cm:stringType value=“ALPHA”/> GLOBAL, LOCAL, VIEW  
--numeric <cm:stringType value=“NUMERIC”/> GLOBAL, LOCAL, VIEW  
--alphanumeric <cm:stringType value=“ALPHANUMERIC”/> GLOBAL, LOCAL, VIEW  
--Extended alphanumeric <cm:stringType value=“ALPHANUMERIC_EXT”/> GLOBAL, LOCAL, VIEW  
--other <cm:stringType value=“OTHER”/> GLOBAL, LOCAL, VIEW  
-Short integer      
-Long integer      
-Double      
-Decimal      
-Date      
-Time      
-Timestamp      
-BLOB <CM:dataType value=“BLOB”/> GLOBAL, LOCAL, VIEW  
-CLOB <CM:dataType value=“CLOB”/> GLOBAL, LOCAL, VIEW  
-max      
-min      
-length      
-scale/precision      
-Description w/ lang code cm:description element with a value attribute and xsi:lang attribute (to indicate which language it belongs to). GLOBAL  
Attribute groups (global)      
-Name      
-Attributes      
-Description w/ lang code cm:description element with a value attribute and xsi:lang attribute (to indicate which language it belongs to). GLOBAL  
Reference attribute Indicated by an annotation element, cm:referenceAttribute with the following attributes: GLOBAL, LOCAL, VIEW  
-Name      
-Reference delete rule {cm:referenceAttribute} cm:deleteRule=<string> in enumeration type {NO_ACTION, SET_NULL, CASCADE, RESTRICT. GLOBAL, LOCAL, VIEW  
-Reference sequence number {cm:referenceAttribute} cm:sequenceNumber=<short> GLOBAL, LOCAL, VIEW  
-Description w/ lang code cm:description element with a value attribute and xsi:lang attribute (to indicate which language it belongs to). GLOBAL  
Item Type: definition      
-Name      
-Description w/ lang code cm:description element with a value attribute and xsi:lang attribute (to indicate which language it belongs to). GLOBAL  
-New version policy cm:versionPolicy element with a value attribute in enumeration type {NEVER, ALWAYS, BY_APPLICATION}. GLOBAL  
-Maximum total versions cm:maximumVersions element with a value attribute. GLOBAL  
-Properties     The cmdatamodel.xsd file contains the definition of the properties.
-Resource Object     The cmdatamodel.xsd3 file contains the definition of the resourceObj.
-Embedded Link object     The cmdatamodel.xsd file contains the definition of the links, which is <element name=“links”> <complexType> <sequence> <element name=“outbound” minOccurs=“0” maxOccurs=“unbounded”> <complexType> <attribute name=“toitem” type=“string”/> <attribute name=“linktype” type=“string”/> <attribute name=“linkitem” type=“string”/> </complexType> </element> <element name=“inbound” minOccurs=“0” maxOccurs=“unbounded”> <complexType> <attribute name=“fromitem” type=“string”/> <attribute name=“linktype” type=“string”/> <attribute name=“linkinfoitem” type=“string”/> </complexType> </element> </complexType> </element>. Note that this is part of the predefined IBM Content Manager schema file, cmdatamodel.xsd, to be imported.
Item type classification Implied by the following elements:    
1. Non-resource item If cm:entityType does not exist or cm:entityType=“ITEM”. GLOBAL, VIEW  
2. Resource item (includes the following info ) A cm:entityType element with the value=“RESOURCEITEM” to indicate this is a resource item type. Also there should be a cm:resourceItemInfo element with the following attributes/elements. GLOBAL, VIEW  
-XDO class name {cm:resourceItemInfo} a cm:name attribute in the cm:XDOClass child element of cm:resourceItemInfo element. GLOBAL  
-Text Searchable {cm:resourceItemInfo} a cm:textSearchable element, with a value attribute in boolean type. GLOBAL  
-Text Index Info {cm:resourceItemInfo} same set of attributes in the cm:textIndexInfo element as the text information in the attribute declaration. But in this case, it is in the item type level and the element is a child element of cm:resourceItemInfo. GLOBAL  
-RM name {cm:resourceItemInfo} cm:RM child element of cm:resourceItemInfo element with name and attributes. GLOBAL  
-SMS coll name {cm:resourceItemInfo} cm:SMSCollection child element of cm:resourceItemInfo element with name attributes. GLOBAL  
-Prefetch coll name {cm:resourceItemInfo} cm:prefetchCollection element with name and attributes. GLOBAL  
-an embedded binary object (used in the instance level)     The cmdatamodel.xsd contains the definition of the resourceObject, which is <element name=“cm:resourceObject”> <complexType> <choice> <element name=“content”> <complexType> <attribute name=“value” type=“base64Binary”/> </complexType> </element> <element name=“url”> <complexType> <attribute name=“value” type=“anyURI”/> </complexType> </element> </complexType> </element> Note that the type would be either “base64Binary” or “hexBinary”. This is part of the predefined IBM Content Manager schema file, cmdatamodel.xsd, to be imported.
3. Document item type (includes the following info ) A cm:entityType element with the value=“DOCUMENT” to indicate this element declaration is a document type. GLOBAL, VIEW There are several predefined ICMPARTs ( ICMANNOTATION, ICMBASE, ICMBASETEXT, ICMBASESTREAM, ICMNOTELOG). They are handled or represented similarly to the regular user part, which is part of the schema file.
-Part type name      
-Text searchable /option Same case as in the resource item type definition, having the same cm:textsearchable and cm:textIndexInfo elements under the cm:resourceItemInfo element. GLOBAL  
-ACL name cm:ACL element with name and attributes under the referenced element. For example: <element ref=“cm:ICMBASE” …> <xsd:annotation> <xsd:appinfo> <cm:ACL name=“…”/> GLOBAL  
-RM name cm:RM element with name and attributes under the reference element name. GLOBAL  
-SMS coll name cm:SMSCollection element with name and attributes under the reference element name. GLOBAL  
-New version policy cm:versionPolicy element name with a value attribute in enumeration type {NEVER, ALWAYS, BY_APPLICATION}. GLOBAL  
4. Document part type A cm:entityType element with the value=“PART” to indicate this element is a document part type. GLOBAL, VIEW If it is an IBM Content Manager predefined PART type, it is located in the cmdatamodel.xsd file.
-XDO class name cm:XDOClass element with a value attribute. GLOBAL  
-Text searchable /option Same case as in the resource item type definition, having the same cm:textsearchable and cm:textIndexInfo elements within the cm:resourceItemInfo element. GLOBAL  
Item retention period cm:itemRetention element with value and unit attributes. The unit attribute is in enumeration type {YEAR, MONTH, WEEK, DAY}. GLOBAL  
Start item on process cm:startProcess element with a name attribute. GLOBAL  
Default Priority cm:defaultPriority element with a value attribute. GLOBAL  
Description cm:description element with a value attribute and xsi:lang attribute (to indicate which language it belongs to). GLOBAL  
Item type level ACL Name cm:ACL element with name and attributes. GLOBAL  
Item Level ACL Binding Flag cm:itemACLBinding element with a flag attribute. GLOBAL  
-Parent Folder ACL Inheritance Enabled
{cm:isParentFolderACL
InheritanceEnabled } 
cm:value= <boolean>
GLOBAL, LOCAL  
-Reindex Default ACL
{cm:reindexDefaultAC } cm:
value=<{SOURCE_ITEM_ACL, 
DEFAULT_ACL_OF_TARGET_
ITEMTYPE}>
GLOBAL, LOCAL  
-Reindex ACL Control Mode Type
{cm:reindexACLControlModeType }
cm:value=<APPLICATION_
CONTROL, SERVER_CONTROL>
GLOBAL, LOCAL  
Retention Management      
-Item Retention Policy {cm:itemRetentionPolicy } cm:name=<string> GLOBAL, LOCAL  
-Hold Container {cm:isHoldContainer } cm:value=<boolean> GLOBAL, LOCAL  
-Items Can Be On Hold {cm:itemsCanBeOnHold } cm:value=<boolean> GLOBAL, LOCAL  
-Delete Scheduler Type {cm:deleteSchedulerType } cm:value=<{POLICY, ITEM_TYPE}> GLOBAL, LOCAL  
-Delete Schedule {cm:deleteSchedule } cm:value=<string> GLOBAL, LOCAL  
-Delete Max Rows {cm:deleteMaxRows } cm:value=<integer> GLOBAL, LOCAL  
-Delete Commit Count {cm:deleteCommitCount } cm:value=<integer> GLOBAL, LOCAL  
-Delete Max Duration {cm:deleteMaxDuration } cm:value=<integer> GLOBAL, LOCAL  
Auto Linking cm:autoLinkEnable element with the following child elements. GLOBAL  
-Auto Linking Rules a cm:autoLinkAttributes element with the following attributes:    
-Current item type {cm:autoLinkAttributes} sourceItemType=<string> GLOBAL  
-Item type to be linked {cm:autoLinkAttributes} cm:targetItemType=<string GLOBAL  
-Auto linking attribute {cm:autoLinkAttributes} cm:attributeName=<string> GLOBAL  
-Auto linking attribute {cm:autoLinkAttributes} cm:attributeGroupName=<string> GLOBAL  
-Link type {cm:autoLinkAttributes} cm:autoLinkType=<string> GLOBAL  
-Auto Linking SMS A cm:autoLinkingSMSRule element with a value attribute. GLOBAL  
logging      
-Item type events to log cm:itemEventFlag element with value attribute. GLOBAL  
Foreign keys A cm:foreignKey element with the following attributes: GLOBAL  
-Constraint name {cm:foreignKey} cm:constraintName=<string> GLOBAL  
-Update rule {cm:foreignKey} cm:updateRule={RESTRICT, NO_ACTION} GLOBAL  
-Delete rule {cm:foreignKey} cm:deleteRule={RESTRICT, CASCADE, NO_ACTION, SET_NULL} GLOBAL  
-Source component {cm:foreignKey} cm:sourceComponent=<string> GLOBAL  
-Target item type {cm:foreignKey} cm:targetItemType=<string> GLOBAL  
-Target external table {cm:foreignKey} cm:targetTable=<string> GLOBAL  
-Attribute Pairs A cm:attributePair element under the cm:foreignKey element with the following attributes: GLOBAL  
-Source attribute group {cm:attributePair} cm:sourceAttributeGroup=<string> GLOBAL  
-Source attribute {cm:attributePair} cm:sourceAttribute=<string> GLOBAL  
-Target attribute group {cm:attributePair} cm:targetAttributeGroup=<string> GLOBAL  
-Target attribute {cm:attributePair} cm:targetAttribute=<string> GLOBAL  
-External table column name {cm:attributePair} cm:targetTableColumn=<string> GLOBAL  
User exits cm:userExit element with the following attributes: GLOBAL, VIEW  
-Exit name {cm:userExit} cm:name=<string> GLOBAL, VIEW  
-Function name {cm:userExit} cm:functionName=<string> GLOBAL, VIEW  
-DLL name {cm:userExit} cm:DLLName=<string> GLOBAL, VIEW  
Access Module A cm:accessModule element with the following attributes: GLOBAL  
-name {cm:accessModule} cm:name=<string> GLOBAL  
-result {cm:accessModule} cm:result=<integer> GLOBAL  
-status {cm:accessModule} cm:status=<short> GLOBAL  
-version {cm:accessModule} cm:version=<short> GLOBAL  
Previous Access Module A cm:previousAccessModule element with a version attribute. GLOBAL  
Component Type:      
-Attribute groups      
-Reference attributes      
-Attributes      
-Text Searchable A cm:textSearchable element, with a value attribute in boolean type. GLOBAL, LOCAL, VIEW  
-Text Index Information A cm:textIndexInfo element, with the following attributes:. GLOBAL, LOCAL  
-Commit count {cm:textIndexInfo } cm:commitCount=<integer> GLOBAL, LOCAL  
-Format {cm:textIndexInfo } cm:format=<integer> GLOBAL, LOCAL  
-Index CCSID {cm:textIndexInfo } cm:CCSID=<integer> GLOBAL, LOCAL  
-Index Directory {cm:textIndexInfo } cm:directory=<string> GLOBAL, LOCAL  
-Index Language Code {cm:textIndexInfo } cm:langCode=<string> GLOBAL, LOCAL  
-Minimum changes {cm:textIndexInfo } cm:minChanges=<integer> GLOBAL, LOCAL  
-Model File {cm:textIndexInfo } cm:modelFile=<string> GLOBAL, LOCAL  
-Model Name {cm:textIndexInfo } cm:modelName=<string> GLOBAL, LOCAL  
-Model CCSID {cm:textIndexInfo } cm:modelCCSID=<integer> GLOBAL, LOCAL  
-UDF Name {cm:textIndexInfo } cm:UDFName=<string> GLOBAL, LOCAL  
-UDF Schema {cm:textIndexInfo } cm:UDFSchema=<integer> GLOBAL, LOCAL  
-Update Frequency {cm:textIndexInfo } cm:updateFrequency=<string> GLOBAL, LOCAL  
-Update Frequency Unit {cm:textIndexInfo } cm:updateFrequencyUnit= <{MINUTE, HOUR}> GLOBAL, LOCAL  
-Working Directory {cm:textIndexInfo } cm:workingDir=<string> GLOBAL, LOCAL  
-Is representing item cm:representative element with a value attribute in boolean type. LOCAL  
-Is unique cm:unique element with a value attribute in boolean type. LOCAL  
-Is required      
-Max value      
-Min value      
-Default value      
-Resource Manager attribute cm:isResourceManagerAttr element with a value attribute in boolean type. LOCAL  
-Database indexes A cm:databaseIndexInfo element, with the following attributes: GLOBAL, LOCAL  
--Name {cm:databaseIndexInfo } cm:name=<string> GLOBAL, LOCAL  
--Unique {cm:databaseIndexInfo } cm:unique=<boolean> GLOBAL, LOCAL  
--Index Schema {cm:databaseIndexInfo } cm:indexSchema=<string> GLOBAL, LOCAL  
--Attributes A subelement, cm:indexedAttribute element under the same cm:databaseIndexInfo element with the following attributes: GLOBAL, LOCAL  
---Name {cm:indexAttribute } cm:name=<string> GLOBAL, LOCAL  
---Index Order {cm:indexAttribute } cm:indexOrder={ASCENDING, DESCENDING} GLOBAL, LOCAL  
Delete rule A cm:deleteRule element with a value attribute {RESTRICT, CASCADE}. LOCAL  
Sub-components/ child components      
Item Type View: A cm:entityType element with the value=“ITEM” and a cm:entityView element with cm:baseEntityType attribute to indicate which item type this refers to. VIEW  
Component Type View:      
-Attributes cm:representative element with a value attribute in boolean type VIEW  
--readable cm:readable element with a value attribute in boolean type. No such concept exists in the XML schema. Only has “fixed” in term of the value, or “prohibited” in term of attribute name definition. VIEW  
--writable cm:writeable element with a value attribute in boolean type VIEW  
--queryable cm:queryable element with a value attribute in boolean type VIEW  
--excludeRow cm:excludeRow element with a value attribute in boolean type VIEW  
--View compare value cm:viewCompareValue element with a value attribute VIEW  
--View operator cm:viewOperator element with a value attribute in enumeration type {OPCODE_EQ} VIEW  
--View sequenceNumber cm:viewSequenceNo element with a value attribute VIEW  
-name      
-description      
-Text searchable      
-Enabled creating the native folder      
-Attribute:      
--name      
--description cm:description element with a value attribute and xsi:lang attribute (to indicate which language it belongs to) GLOBAL  
--datatype and other attribute information, such as length, precision, scale, max, min, nullable, queryable, writeable      
Schema mapping: One or more cm:schemaMapping elements with the following attributes: GLOBAL  
-Fed entity name cm:fedEntityName=<string> GLOBAL  
-Fed attr name cm:fedAttrName=<string> GLOBAL  
-Native server name cm:serverName=<string> GLOBAL  
-Native server type cm:serverType=<string> GLOBAL  
-Native entity name cm:nativeEntityName=<string> GLOBAL  
-Native attr name cm:nativeAttrName=<string> GLOBAL  
Table 3. Text index information for DB2TS LUW
Text Index Information cm:textIndexInfoDB2TS element with attributes Scope of the text
-Commit count {cm:textIndexInfoDB2TS } cm:commitCount=<integer> GLOBAL, LOCAL
-Format {cm:textIndexInfoDB2TS } cm:format=<integer> GLOBAL, LOCAL
-Index Language Code {cm:textIndexInfoDB2TS } cm:langCode=<string> GLOBAL, LOCAL
-Minimum changes {cm:textIndexInfoDB2TS } cm:minChanges=<integer> GLOBAL, LOCAL
-UDF Name {cm:textIndexInfoDB2TS } cm:UDFName=<string> GLOBAL, LOCAL
-UDF Schema {cm:textIndexInfoDB2TS } cm:UDFSchema=<string> GLOBAL, LOCAL
-Constructor Name
{cm:textIndexInfoDB2TS }
 cm:constructorName=
<string>
GLOBAL, LOCAL
-Collection Directory {cm:textIndexInfoDB2TS } cm:collectionDir=<string> GLOBAL, LOCAL
-Active {cm:textIndexInfoDB2TS } cm:active=<boolean> GLOBAL, LOCAL
-Update Frequency
{cm:textIndexInfoDB2TS } 
cm:updateFrequency=
<integer> 
GLOBAL, LOCAL
-Update Frequency Unit {cm:textIndexInfoDB2TS } cm:updateFrequencyUnit= <{MINUTE, HOUR}> GLOBAL, LOCAL
-Update Frequency String
{cm:textIndexInfoDB2TS } 
cm:updateFrequencyString=
<string>
GLOBAL, LOCAL
-Commit Type {cm:textIndexInfoDB2TS } cm:commitType= <{rows, hours}> GLOBAL, LOCAL
-Commit Cycles {cm:textIndexInfoDB2TS } cm:commitCycles=<integer> GLOBAL, LOCAL
Table 4. Text index information for DB2TS zOS
Text Index Information cm:zOSTextIndexInfoDB2TS element with attributes Scope of the text
-Commit count {cm:zOSTextIndexInfoDB2TS } cm:commitCount=<integer> GLOBAL, LOCAL
-Format {cm:zOSTextIndexInfoDB2TS } cm:format=<integer> GLOBAL, LOCAL
-Index Language Code {cm:zOSTextIndexInfoDB2TS } cm:langCode=<string> GLOBAL, LOCAL
-Minimum changes {cm:zOSTextIndexInfoDB2TS } cm:minChanges=<integer> GLOBAL, LOCAL
-UDF Name {cm:zOSTextIndexInfoDB2TS } cm:UDFName=<string> GLOBAL, LOCAL
-UDF Schema {cm:zOSTextIndexInfoDB2TS } cm:UDFSchema=<string> GLOBAL, LOCAL
-Constructor Name
{cm:zOSTextIndexInfo
DB2TS } cm:constructor
Name=<string>
GLOBAL, LOCAL
-Update Frequency
{cm:zOSTextIndexInfo
DB2TS } cm:updateFrequency
<integer> 
GLOBAL, LOCAL
-Update Frequency Unit {cm:zOSTextIndexInfoDB2TS } cm:updateFrequencyUnit= <{MINUTE, HOUR}> GLOBAL, LOCAL
-Update Frequency String
{cm:zOSTextIndexInfo
DB2TS } cm:updateFrequency
String=<string>
GLOBAL, LOCAL
-Update Method {cm:zOSTextIndexInfoDB2TS } cm:updateMethod=<string> GLOBAL, LOCAL
-Commit Type {cm:zOSTextIndexInfoDB2TS } cm:commitType= <{rows, hours}> GLOBAL, LOCAL
-Commit Cycles {cm:zOSTextIndexInfoDB2TS } cm:commitCycles=<integer> GLOBAL, LOCAL

Example: XML schema

The following example shows a sample storage schema (XSD) snippet for the XYZ Insurance policy item type:

<?xml version=“1.0” encoding=“UTF-8”?>
<xsd:schema xmlns:cm=“http://www.ibm.com/xmlns/db2/cm/api/1.0/schema”
xmlns:xsd=“http://www.w3.org/2001/XMLSchema”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>
<xsd:import namespace=“http://www.ibm.com/xmlns/db2/cm/api/1.0/schema”
schemaLocation=“cmdatamodel.xsd”/>
<xsd:attribute name=“XYZ_VIN”><xsd:annotation><xsd:appinfo>
  <cm:description value=“Vehicle Identification Number (Content 
  Manager Sample Attribute)” xsi:lang=“ENU”/><cm:stringType 
  value=“OTHER”/></xsd:appinfo></xsd:annotation><xsd:simpleType>
  <xsd:restriction base=“xsd:string”><xsd:length value=“17”/>
  </xsd:restriction></xsd:simpleType></xsd:attribute>
<xsd:attribute name=“XYZ_InsrdLName”>...</xsd:attribute>
<xsd:attribute name=“XYZ_InsrdFName”>...</xsd:attribute>
<xsd:attribute name=“XYZ_ZIPCode”>...</xsd:attribute>
<xsd:attribute name=“XYZ_City”>...</xsd:attribute>
<xsd:attribute name=“XYZ_State”>...</xsd:attribute>
<xsd:attribute name=“XYZ_Street”>...</xsd:attribute>
<xsd:attribute name=“XYZ_PolicyNum”>...</xsd:attribute>
<xsd:element name=“XYZ_InsPolicy”><xsd:annotation><xsd:appinfo>
  <cm:description value=“Insurance Policy (Content Manager Sample 
  Item Type)” xsi:lang=“ENU”/><cm:ACL name=“XYZInsurancePolicyACL”/>
  <cm:versionPolicy value=“ALWAYS”/><cm:maximumVersions value=“10”/>
  <cm:entityType value=“DOCUMENT”/><cm:itemRetention unit=“YEAR” 
  value=“0”/><cm:itemACLBinding flag=“0”/><cm:itemEventFlag value=
  “0”/><cm:accessModule name=“DUMMY” status=“0” version=“0”/><cm:
  previousAccessModule value=“DUMMY”/></xsd:appinfo></xsd:annotation>
  <xsd:complexType><xsd:sequence>
  <xsd:element maxOccurs=“1” minOccurs=“0” ref=“cm:properties”/>
  <xsd:element maxOccurs=“1” minOccurs=“0” ref=“cm:links”/>
  <xsd:element maxOccurs=“unbounded” minOccurs=“0” name=“XYZ_Insured”>
    ...</xsd:element><xsd:element maxOccurs=“unbounded” minOccurs=“0”
  name=“XYZ_VIN”>...</xsd:element><xsd:element maxOccurs=“unbounded”
  minOccurs=“0” ref=“ICMBASE”>...</xsd:element><xsd:element
  maxOccurs=“unbounded” minOccurs=“0” ref=“ICMBASETEXT”>...
  </xsd:element><xsd:element maxOccurs=“unbounded” minOccurs=“0” ref=
  “ICMNOTELOG”>...</xsd:element></xsd:sequence>...</xsd:complexType>
</xsd:element>
<xsd:element name=“ICMBASETEXT”>...</xsd:element>
<xsd:element name=“ICMNOTELOG”>...</xsd:element>
</xsd:schema>