XSD元素与属性的深入剖析
1. XSD中的元素重定义与复杂类型
在XML Schema Definition(XSD)中, <xsd:redefine> 元素是一个强大的工具,它允许我们在不扩展元素的情况下修改已导入元素的定义。以下是 <xsd:redefine> 标签的属性说明:
| 属性 | 描述 |
| ---- | ---- |
| id | 唯一标识符 |
| schemaLocation | 指定要包含的模式的位置 |
<xsd:redefine> 元素的定义如下:
<redefine
id = ID
schemaLocation = anyURI
{any attributes with non-schema namespace . . .}>
Content: (annotation | (simpleType | complexType | group |
attributeGroup))*
</redefine>
它与 <xsd:import> 元素类似,但 <xsd:redefine> 具有重新定义先前定义项的能力。例如,当一个大型模式定义了向消费者发货的内容模型,而公司决定拓展国际市场时,由于国际地址、电话号码等与国内有所不同,我们可以使用
XSD元素与属性的深入解析及应用
超级会员免费看
订阅专栏 解锁全文
514

被折叠的 条评论
为什么被折叠?



