c:type

<c:type
  name = identifier
  visibility? = "public" | "private" | "final"
  allow-empty-string? = boolean
  text-member? = identifier
  resource-type? = type_name
  validation-resource-type? = type_name >
  <!-- Content: (c:meta*, c:member*) -->
</c:type>

Defines a type.

Category
declaration
Permitted parent elements
c:module
c:package

Attributes

allow-empty-string Specifies if an empty string is a valid value for this member.
name The name of the type.
resource-type A type that contains resources for description, display-name, edit-hint, group and short-name attributes.
text-member The name of the member to use as the text representation for this type.
validation-resource-type A type that contains error message resources for validation attributes.
visibility Specifies how the current component can be used in other (using) packages.

In addition to the attributes in the preceding table, there are a number of standard attributes that may appear on any XCST element.

Example: Russian Doll Type Definition

If you omit as attribute on c:member you can define child members for a russian doll style of type definition.

<c:type name='Order'>
   <c:member name='Name' as='string' required='yes'/>
   <c:member name='Email' as='string' required='yes' display-name='E-mail'/>
   <c:member name='Telephone' as='string' required='yes'/>
   <c:member name='ShippingAddress' required='yes'>
      <c:member name='Line1' as='string' required='yes'/>
      <c:member name='Line2' as='string' required='yes'/>
      <c:member name='City' as='string' required='yes'/>
      <c:member name='Region' as='string' required='yes'/>
      <c:member name='Country' as='string' required='yes' min-length='2' max-length='2'/>
   </c:member>
</c:type>

See Also