XML Schema import 元素
定义和用法
import 元素用于向一个文档添加带有不同目标命名空间的多个 schema。
元素信息
出现次数 | 无限制 |
父元素 | schema |
内容 | annotation |
语法
any attributes > (annotation?)
属性 | 描述 |
---|---|
id | 可选。规定该元素的唯一的 ID。 |
namespace | 必需。规定要导入的命名空间的 URI。 |
schemaLocation | Optional. Specify the URI of the imported namespace. |
any attributes | Optional. Specify any other attributes with non-schema namespaces. |
(The ? symbol declaration is in the import element, which can appear zero or one time.)
Example
The following example shows how to import a namespace:
<?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:import namespace="http://www.codew3c.com/schema"/> .. .. .. </xs:schema>