Chapter 18 Working with XML


Reference

A reference is a simplified declaration of an element or an attribute group referencing a global definition. In PowerDesigner, you design a reference using an association with the <<ref>> stereotype.

In the following example, element Customer references complex type UsAddress.

<xsd:element name="Customer">
 <xsd:complexType>
  <xsd:element name="name" type="int"/>
  <xsd:element name="ID" type="int"/>
  <xsd:complexType ref="UsAddress" minOccurs="0" maxOccurs="unbounded"/>
 </xsd:complexType>
</xsd:element>

Note that the referenced element is introduced by its stereotype. In the above example, UsAddress is of <<complexType>> and complexType is displayed in the reference line:

<xsd:complexType ref="UsAddress" minOccurs="0" maxOccurs="unbounded"/>

 


Copyright (C) 2006. Sybase Inc. All rights reserved.