以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 DTD/XML Schema 』  (http://bbs.xml.org.cn/list.asp?boardid=23)
----  [求助]<xsd:element>的属性  (http://bbs.xml.org.cn/dispbbs.asp?boardid=23&rootid=&id=9757)


--  作者:jeffrey_zheng
--  发布时间:9/4/2004 11:19:00 AM

--  [求助]<xsd:element>的属性
<xsd:element abstract="" block="" default="" final="" fixed="" form="" maxOccurs="" minOccurs="" name="" nillable="" ref="" substitutionGroup="" type=""/>
xsd:element 的这些属性都代表什么意思?哪位大侠能指点一二。
我知道的:
maxOccurs 表示元素在xml中可出现的最大次数
minOccurs 表示元素在xml中可出现的最小次数
name  表示元素的名字
type 元素的数据类型
default 表示元素的默认值

--  作者:jeffrey_zheng
--  发布时间:9/4/2004 11:20:00 AM

--  
自己先顶下
--  作者:hugh
--  发布时间:9/14/2004 10:34:00 PM

--  
Here are items that you use in declaring elements:

name:  use this to declare what will be the name of the element in instance
            documents.
ref:  use this to refer-to an element declaration.
type:  use this to declare the datatype of the element's value in instance
          documents.
id:  use this to associate a unique identifier to the element component.
 This id has no representation in the instance document.  It is purely
 internal to the schema.  The type of this value must be xsd:ID.
form:  use this to override elementFormDefault (which is specified on the schema
 element).  There are two possible values - qualified or unqualified.
 If form is assigned the value qualified then the element must be
 namespace-qualified in instance documents.
abstract: use this to indicate that the element is only a placeholder for other elements
 which are in its substitutionGroup.  The default value for abstract is false
block:  use this to prohibit this element from being replaced by an element in its
 substitutionGroup, or prohibit this element's type from being replaced by a
 derived type.
default:  use this to give the element a default value.
fixed:  use this to give the element a fixed (constant) value.
minOccurs: use this to specify the minimum number of times that the element may
 occur in an instance document. The default value for minOccurs is 1.
maxOccurs: use this to specify the maximum number of times that the element may
 occur in an instance document. The default value for maxOccurs is 1.  Note:
          the value for minOccurs must be less than or equal to maxOccurs.
nillable: use this to assert that if there's no value available for the element then in
 the instance document we indicate it with the xsi:null attribute. The default
 value for nillable is false.
substitutionGroup: use this to indicate that this element can substitute for the element
 identified by the substitutionGroup


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
46.875ms