XMLスキーマの要素を含みます
定義と使用法
INCLUDE要素である使用済みのアドオンA文書とのザ・同じターゲット名前空間複数のスキーマ。
要素情報
- 親エレメント:スキーマ
文法
<include
id=ID
schemaLocation=anyURI
any attributes
>
(annotation?)
</include>
id=ID
schemaLocation=anyURI
any attributes
>
(annotation?)
</include>
(?サイン宣言されていることをinclude要素、インクルード要素缶発生ゼロまたは1時間。)
属性 | 描述 |
---|---|
id | 可选。规定该元素的唯一的 ID。 |
schemaLocation | 必需。规定在包含 schema 的目标命名空间中,要包括的 schema 的 URI。 |
any attributes | 可选。规定带有 non-schema 命名空间的任何其他属性。 |
例1
スキーマに含まれていることで、ファイルが同じターゲット名前空間へのすべての参照に含まれている必要があります。 スキーマのターゲット名前空間が一致しない場合、それは効果がありません、次のとおりです。
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.w3cschool.cc/schema">
<xs:include schemaLocation="http://www.w3cschool.cc/schema/customer.xsd"/>
<xs:include schemaLocation="http://www.w3cschool.cc/schema/company.xsd"/>
..
..
..
</xs:schema>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.w3cschool.cc/schema">
<xs:include schemaLocation="http://www.w3cschool.cc/schema/customer.xsd"/>
<xs:include schemaLocation="http://www.w3cschool.cc/schema/company.xsd"/>
..
..
..
</xs:schema>
完全なXMLスキーマリファレンス