Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

XML Schema include Element

XML Schema include Element


XML Schema Reference Manual Complete XML Schema Reference Manual


Definition and Usage

The include element is used to add multiple schemas with the same target namespace to a document.

Element Information

Syntax

id=ID

schemaLocation=anyURI

any attributes

(annotation?)

(The ? symbol declares that the element can occur zero or one time in the include element.)

property Description
id Optional. Specifies a unique ID for the element.
schemaLocation Required. Specifies the URI of the schema to include in the target namespace of the containing schema.
any attributes Optional. Specifies any other attributes with a non-schema namespace.

Example 1

With the included schema, the included files must all refer to the same target namespace. If the schema target namespaces do not match, the inclusion will not be valid:

targetNamespace="https://www.runoob.com/schema">

..

..

..


XML Schema Reference Manual Complete XML Schema Reference Manual