XSD 选择和枚举有什么区别? [英] What is the difference between XSD choice and enumeration?

查看:36
本文介绍了XSD 选择和枚举有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

XSD 选择和枚举有什么区别?

What is the difference between XSD choice and enumeration?

推荐答案

它们完全无关.

Choice 表示在元素的内容模型中,您可以使用多个子元素之一:例如,在文档中,您可以选择章节或附录作为子元素.

Choice indicates that within the content model of an element, you can use one of several child elements: for example within a document you have a choice of chapter or appendix as child elements.

枚举用于限制可以出现在文本或属性节点中的值,例如表示颜色属性的值必须是红色、绿色或蓝色.

Enumeration is used to restrict the values that can appear in a text or attribute node, for example to say that the value of a color attribute must be red, green, or blue.

这篇关于XSD 选择和枚举有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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