Export (0) Print
Expand All

<xsd:include> Element

Includes the specified schema document in the target namespace of the containing schema.

<include
  id = ID 
  schemaLocation = anyURI 
  {any attributes with non-schema Namespace}...>
Content: (annotation?)
</include>

id

The ID of this element. The id value must be of type ID and be unique within the document containing this element.

Optional.

schemaLocation

The URI reference to the location of a schema document to include in the target namespace of the containing schema.

Required.

Number of occurrences

Unlimited

Parent elements

schema

Child elements

annotation

The included schema document must meet one of the following conditions.

  • It must have the same target namespace as the containing schema document.

  • It must not have a target namespace specified (no targetNamespace attribute).

The import element allows references to schema components from schema documents with different target namespaces; the include element adds the schema components from other schema documents that have the same target namespace (or no specified target namespace) to the containing schema. In short, the import element allows you to use schema components from any schema; the include element allows you to add all the components of an included schema to the containing schema.

For an example, see import.

For more information see the W3C XML Schema Part 1: Structures Recommendation at www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-all.

Show:
© 2014 Microsoft