XML Schema elementem importu
Definicja i Wykorzystanie
Element import służy do dodawania wielu schematu z innym docelowej przestrzeni nazw do dokumentu.
Element informacji
- Parent Element: schema
gramatyka
<import
id=ID
namespace=anyURI
schemaLocation=anyURI
any attributes
>
(annotation?)
</import>
id=ID
namespace=anyURI
schemaLocation=anyURI
any attributes
>
(annotation?)
</import>
(? Znak deklaruje, że element import, element może wystąpić zero lub jeden raz).
属性 | 描述 |
---|---|
id | 可选。规定该元素的唯一的 ID。 |
namespace | 必需。规定要导入的命名空间的 URI。 |
schemaLocation | 可选。规定被导入的命名空间的 URI。 |
any attributes | 可选。规定带有 non-schema 命名空间的任何其他属性。 |
Przykład 1
Poniższy przykład pokazuje zaimportować przestrzeń nazw:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://www.w3cschool.cc/schema"/>
..
..
..
</xs:schema>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://www.w3cschool.cc/schema"/>
..
..
..
</xs:schema>
Kompletna XML Schema Reference