L.4.15.3.1 Type of Structural Element
There is a single simple type, ST_PtType, used to define the contents of this element; this is defined later. Structural elements hold the data associated with a diagram and are defined in relation to one- another through relationship types. Seven different elements are available to the user:
There are defined relationships or connections between two model elements. Four types of relationships are defined in the simple type ST_CxnType:
An element is a single item, such as a node or transition in the data model. Within the realm of DrawingML, the complex type CT_Pt holds information describing an element within a diagram. Within this description lies both the data held within the element, and any formatting on that element. A CT_Pt is defined as follows:
<xsd:complexType name="CT_Pt">
<xsd:sequence>
<xsd:element name="prSet" type="CT_ElemPropSet" minOccurs="0"
maxOccurs="1" />
<xsd:element name="spPr" type="a:CT_ShapeProperties"
minOccurs="0" maxOccurs="1" />
<xsd:element name="style" type="a:CT_ShapeStyle"
minOccurs="0" maxOccurs="1" />
<xsd:element name="t" type="a:CT_TextBody" minOccurs="0"
maxOccurs="1" />
</xsd:sequence>
<xsd:attribute name="modelId" type="ST_ModelId" use="required" />
<xsd:attribute name="type" type="ST_PtType" use="optional"
default="node" />
<xsd:attribute name="cxnId" type="ST_ModelId" use="optional"
default="0" />
</xsd:complexType>
The attribute modelId holds a unique id for a particular element. This unique id can be referenced elsewhere, for example, from within a connection list. This attribute is required for every point defined in the data model.
The last two attributes of the CT_Pt are optional. The first defines the type of point with the default being a node. The second defines a connection id. This connection id is only used if the point type is
A relationship is a connection between any two model elements. An example of where a relationship would be used can be seen in figures 1 and 2. In each of those examples, the arrows between the nodes have relationships defined. A relationship is defined as follows:
<xsd:complexType name="CT_Cxn">
<xsd:attribute name="modelId" type="ST_ModelId" use="required" />
<xsd:attribute name="type" type="ST_CxnType" use="optional"
default="parOf" />
<xsd:attribute name="srcId" type="ST_ModelId" use="required" />
<xsd:attribute name="destId" type="ST_ModelId" use="required" />
<xsd:attribute name="srcOrd" type="xsd:unsignedInt" use="required" />
<xsd:attribute name="destOrd" type="xsd:unsignedInt" use="required" />
<xsd:attribute name="parTransId" type="ST_ModelId" use="optional"
default="0" />
<xsd:attribute name="sibTransId" type="ST_ModelId" use="optional"
default="0" />
<xsd:attribute name="presId" type="xsd:string" use="optional"
default="" />
</xsd:complexType>
The relationship, as with the element, has a unique id associated with it referred to as the modelID. The srcId and destId attributes refer to ids of the source element and destination element, respectively, that this relationship is defined between.
The srcOrd and destOrd refer to the ordinality of siblings for a given connection. For example, if a node had three siblings, A, B, and C, then the srcOrd would define if they were to show up as A, B, C, or perhaps B, C, and then A.
The presId attribute contains the presentation that is associated with this particular relationship.
The complex type CT_PtList is simply a sequence of elements.
Its definition is as follows:
<xsd:complexType name="CT_PtList">
<xsd:sequence>
<xsd:element name="pt" type="CT_Pt" minOccurs="0"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
This complex type, CT_CxnList, is simply a sequence of connections. Its definition is as follows:
<xsd:complexType name="CT_CxnList" oxsd:cname="Relationships">
<xsd:sequence>
<xsd:element name="cxn" type="CT_Cxn" minOccurs="0"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
The complex type CT_DataModel defines the data model and contains a sequence of elements. It is defined as follows:
<xsd:complexType name="CT_DataModel">
<xsd:sequence oxsd:emitArgs="flattenSequence">
<xsd:element name="ptLst" type="CT_PtList" />
<xsd:element name="cxnLst" type="CT_CxnList" minOccurs="0"
maxOccurs="1" />
<xsd:element name="bg" type="a:CT_BackgroundFormatting"
minOccurs="0" />
<xsd:element name="whole" type="a:CT_WholeE2oFormatting"
minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
The data model contains a list of elements, a list of connections, and formatting properties for the background object and the diagram container. This complex type is responsible for holding all data- bound information of the diagram being created.