2.1.25 CollectionType

If the type of the FunctionParameter or ReturnType is a collection, the type can be expressed as an attribute or by using child element syntax.

The following is an example of the type expressed as an attribute.

 <Parameter Name="Owners" Type="Collection(Model.Person)" />

The following is an example of the type expressed by using child element syntax.

 <Parameter Name="Owners">
       <CollectionType>
       <TypeRef Name="Model.Person" />
       </CollectionType>
 </Parameter>

The following rules apply to the CollectionType element:

  • CollectionType MUST define the type either as an attribute or as a child element.

  • Attribute syntax can be used only if the collection is a nominal type.

  • CollectionType can define facets if the type is a scalar type. The Default facet cannot be applied to a CollectionType.

  • CollectionType can contain any number of AnnotationAttribute attributes. The full names of the AnnotationAttribute attributes cannot collide.

  • CollectionType can define one of the following as a child element:

  • CollectionType elements can contain any number of AnnotationElement elements.

  • AnnotationElement is last in the sequence of child elements of CollectionType.

Graphic representation in table format of the rules that apply to the CollectionType element.

All child elements are to appear in the order indicated. For all child elements within a given choice, the child elements can be ordered arbitrarily.

Show: