Share via

<xsd:include> Element

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

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


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


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


Element Information

Number of occurrences


Parent elements


Child elements



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.

Other Resources

For more information see the W3C XML Schema Part 1: Structures Recommendation at\#element-all.

See Also


XML Schemas (XSD) Reference
XML Schema Elements


<xsd:import> Element