Notes for XML Schema 20081225

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"

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值