2.1.13 Using

Using imports the contents of the specified namespace. A schema can refer to contents of another schema or namespace by importing it by using the Using clause. The imported namespace can be associated with an alias that is then used to refer to its types, or the types can be directly used by specifying its fully qualified name.

Note Semantically, Using is closer to a merge. Unfortunately, the name does not reflect this. If it was truly "using", structures in the schema being used would be unaffected. However, because a dependent schema can derive an EntityType from an EntityType that is declared in the original schema, this has the potential side-effect of changing what might be found in EntitySet elements declared in the schema being used.

The following is an example of the Using element.

 <Using Namespace="Microsoft.Samples.Northwind.Types"
 Alias="Types" />

The following rules apply to the Using element:

  • Using MUST have a Namespace attribute defined that is of type QualifiedName.

  • Using MUST have an Alias attribute defined that is of type SimpleIdentifier. The alias can be used as shorthand for referring to the Namespace linked to that alias via the Using element.

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

  • Using can contain a maximum of one Documentation element.

  • Using can contain any number of AnnotationElement elements.

  • If a Documentation element is defined, it comes before any AnnotationElement elements.

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

All child elements are to appear in the order indicated.