semi-sleep

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  17 Posts :: 0 Stories :: 1 Comments :: 0 Trackbacks

1.A datatype is composed of a value space, a lexical space and facets. there's a one2many relationship between value space and lexical space. It's said that facet define aspect of a value space, but can't it be lexical space? Also, what's Fundamental facets and Constraining or Non-fundamental facets?

2.Atomic datatype is simple datatype like string or decimal or types that derived from these simple datatypes.

3.Value of a list datatype should contains space seperated value(s) of given itemType:
<simpleType name='sizes'>
  <list itemType='decimal'/>
</simpleType>
<cerealSizes xsi:type='sizes'> 8 10.5 12 </cerealSizes>
Value of list datatype is always separated by space first, so the following codes contains 18 items, not 3 items:
<simpleType name='listOfString'>
  <list itemType='string'/>
</simpleType>
<someElement xsi:type='listOfString'>
  this is not list item 1
  this is not list item 2
  this is not list item 3
</someElement>
The pattern facet for list datatype apply to the whole list, not a single item.

4.Union datatype is the union of its member types, the order of member types definition is significant and can overrided by xsi:type:
<xsd:element name='size'>
  <xsd:simpleType>
    <xsd:union>
      <xsd:simpleType>
        <xsd:restriction base='integer'/>
      </xsd:simpleType>
      <xsd:simpleType>
        <xsd:restriction base='string'/>
      </xsd:simpleType>
    </xsd:union>
  </xsd:simpleType>
</xsd:element>
<size>1</size>
<size>large</size>
<size xsi:type='xsd:string'>1</size>
What's xsi namespace? Should be declare to "http://www.w3.org/2001/XMLSchema-instance" first?


5.Notice the phase item type (for list) and member type (for union).

For "XML Schema Part 2: Datatypes Second Edition", started at "2 Type System", ended before "2.5.2 Primitive vs. derived datatypes"

posted on 2008-12-25 17:50 semi-sleep 阅读(217) 评论(0)  编辑  收藏 所属分类: xml

只有注册用户登录后才能发表评论。


网站导航: