XML元架构 [英] XML Meta Schema
问题描述
由于XML模式(XSD)本身就是XML文件,因此应该可以构建 模式(元模式)的模式,对吧?
Since XML schemata (XSD) are themselves XML files, it should be possible to build a schema of a schema (meta-schema), right?
我正在努力实现这一壮举.
I'm struggling to accomplish that feat.
我想创建一个描述模式的模式
一个根complexType
包含一个simpleTypes
序列.
I would like to create a schema that describes a schema
with one root complexType
containing a sequence of simpleTypes
.
推荐答案
Akoma-Ntoso是这种元模式的一个示例:
Akoma-Ntoso is an example of such a meta-schema:
我们可以说Akoma Ntoso是一个元模式,它允许您构建自己的模式:它为不同组织提供了构建基块,供他们用来构建自己的非常独立的模型.让组织使用相似的构建基块,确定这些块以相似的方式走了很长一段路,以允许更大程度的文档集成和交换以及软件工具的可重用性……"
"We can say that Akoma Ntoso is a meta-schema that allows you to build your own schema: it provides the building blocks for different organisations to use to build their own very individual schemas. Having organisations using similar building blocks, identifying these blocks in a similar fashion goes a long way to allow greater integration and exchange of documents as well as reusability of software tools..."
Akoma Ntoso(西非阿坎语中的相联之心")定义了一套简单的,与技术无关的电子表示形式的XML格式的议会,立法和司法文件.
Akoma Ntoso ("linked hearts" in the Akan language of West Africa) defines a set of simple technology-neutral electronic representations in XML format of parliamentary, legislative and judiciary documents.
它使用两个抽象extends
:
元素
extends
是元数据元素,用于指定对所描述自变量扩展的源的引用.
The element
extends
is a metadata element specifying a reference to a source extended by the argument being described.
- 扩展是派生的规则,它以受控方式添加了新功能 遵守基本规则,以便根据 可以通过删除基本规则来验证派生规则 附加的功能.根据得出的有效文件集 规则是根据 基本规则.
- an extension is a derived rule that adds in a controlled way new features to a base rule, so that all documents that are correct according to the derived rule can be validated against the base rule by removing the additional features. The set of valid documents according to the derived rule is a controlled superset of the set of valid documents according to the base rule.
- 限制是比基本限制严格的派生规则,因此所有 根据派生规则正确的文档也有效 根据基数:派生规则的有效文档集 是根据 基本规则.
- a restriction is a derived rule that is stricter than the base one, so that all documents that are correct according to the derived rule are also valid according to the base one: the set of valid documents for the derived rule is a mathematical subset of the set of valid documents according to the base rule.
和restricts
:
元素
restricts
是元数据元素,用于指定对所描述参数所限制的源的引用.
The element
restricts
is a metadata element specifying a reference to a source restricted by the argument being described.
参考
定制Akoma Ntoso-博洛尼亚大学法比奥·维塔利大学教授(pdf)
系统生物学标记语言(SBML):语言规范适用于3级版本1核心
这篇关于XML元架构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!