XML模式1.1中xs:redefine和xs:override之间的区别 [英] Difference between xs:redefine and xs:override in XML schema 1.1

查看:126
本文介绍了XML模式1.1中xs:redefine和xs:override之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在XML模式1.1中,<xs::redefine><xs::override>之间有什么区别.我面前有两本关于XML Schema的书,我仍然看不出它们之间的区别.我唯一确定的是,两者都是普遍的并且不推荐使用<xs::redefine>.

What is the difference between <xs::redefine> and <xs::override> in XML schema 1.1. I've got two books on XML Schema in front of me and I still can't tell the difference. The only thing that I'm sure of is that both are pervasive and that <xs::redefine> is deprecated.

推荐答案

通过重新定义,您可以扩展或限制组件(复杂类型, 简单类型,模型组和属性组).因此,您可以重用 组件的原始定义,您可以对其进行扩展或限制.

Using redefine you can extend or restrict a component (complex types, simple types, model groups and attribute groups). So, you reuse the original definition of the component and you extend or restrict it.

该覆盖允许您替换组件的定义.所以, 您创建了一个具有相同名称的新组件来替换原始组件 定义.您可以覆盖任何顶级命名组件(复杂 类型,简单类型,元素声明,属性声明, 模型组,属性组和符号).

The override allows you to replace the definition of a component. So, you create a new component with the same name that replaces the original definition. You can override any top-level named component (complex types, simple types, element declarations, attributes declarations, model groups, attribute groups and notations).

您可以在此处阅读有关替代的更多信息: http://www.w3.org/TR/xmlschema11-1/#override -模式 或者,您可以阅读Roger Costello XML Schema 1.1教程: http://www.xfront.com/xml-schema-1-1/index.html

You can read more about the override here: http://www.w3.org/TR/xmlschema11-1/#override-schema Or you can read the Roger Costello XML Schema 1.1 tutorial: http://www.xfront.com/xml-schema-1-1/index.html

我还推荐Priscilla Walmsley的书:权威的XML架构,第二版 版"

I also recommend Priscilla Walmsley book: "Definitive XML Schema, 2nd Edition"

关于, 屋大维(Octavian)

Regards, Octavian

这篇关于XML模式1.1中xs:redefine和xs:override之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆