XML Schema内置简单类型
来源:互联网 发布:超级基因优化液txt下载 编辑:程序博客网 时间:2024/05/16 02:30
XML Schema内置简单类型
Table 2. SimpleTypes Built In to XML Schema
SimpleType
Examples(delimited by commas)
Notes
string
Confirm this iselectric
normalizedString
Confirm this iselectric
see (3)
token
Confirm this iselectric
see (4)
base64Binary
GpM7
hexBinary
0FB7
integer
...-1, 0, 1,...
see (2)
positiveInteger
1, 2,...
see (2)
negativeInteger
... -2,-1
see (2)
nonNegativeInteger
0, 1, 2,...
see (2)
nonPositiveInteger
... -2, -1,0
see (2)
long
-9223372036854775808, ... -1, 0, 1, ...9223372036854775807
see (2)
unsignedLong
0, 1, ...18446744073709551615
see (2)
int
-2147483648, ...-1, 0, 1, ... 2147483647
see (2)
unsignedInt
0, 1,...4294967295
see (2)
short
-32768, ... -1, 0,1, ... 32767
see (2)
unsignedShort
0, 1, ...65535
see (2)
byte
-128, ...-1, 0, 1,... 127
see (2)
unsignedByte
0, 1, ...255
see (2)
decimal
-1.23, 0, 123.4,1000.00
see (2)
float
-INF, -1E4, -0, 0,12.78E-2, 12, INF, NaN
equivalent tosingle-precision 32-bit floating point, NaN is "not a number", see(2)
double
-INF, -1E4, -0, 0,12.78E-2, 12, INF, NaN
equivalent todouble-precision 64-bit floating point, see (2)
boolean
true, false, 1,0
duration
P1Y2M3DT10H30M12.3S
1 year, 2 months,3 days, 10 hours, 30 minutes, and 12.3 seconds
dateTime
1999-05-31T13:20:00.000-05:00
May 31st 1999 at1.20pm Eastern Standard Time which is 5 hours behind Co-OrdinatedUniversal Time, see (2)
date
1999-05-31
see (2)
time
13:20:00.000,13:20:00.000-05:00
see (2)
gYear
1999
1999, see (2)(5)
gYearMonth
1999-02
the month ofFebruary 1999, regardless of the number of days, see (2)(5)
gMonth
--05
May, see (2)(5)
gMonthDay
--05-31
every May 31st,see (2) (5)
gDay
---31
the 31st day, see(2) (5)
Name
shipTo
XML 1.0 Nametype
QName
po:USAddress
XML NamespaceQName
NCName
USAddress
XML NamespaceNCName, i.e. a QName without the prefix and colon
anyURI
http://www.example.com/,
http://www.example.com/doc.html#ID5
language
en-GB, en-US,fr
valid values forxml:lang as defined in XML 1.0
ID
XML 1.0 IDattribute type, see (1)
IDREF
XML 1.0 IDREFattribute type, see (1)
IDREFS
XML 1.0 IDREFSattribute type, see (1)
ENTITY
XML 1.0 ENTITYattribute type, see (1)
ENTITIES
XML 1.0 ENTITIESattribute type, see (1)
NOTATION
XML 1.0 NOTATIONattribute type, see (1)
NMTOKEN
US,
Brésil
XML 1.0 NMTOKENattribute type, see (1)
NMTOKENS
US UK,
Brésil CanadaMexique
XML 1.0 NMTOKENSattribute type, i.e. a whitespace separated list of NMTOKEN's, see(1)
Notes: (1) Toretain compatibility between XML Schema and XML 1.0 DTDs, thesimple types ID, IDREF, IDREFS, ENTITY, ENTITIES, NOTATION,NMTOKEN, NMTOKENS should only be used in attributes. (2) A value ofthis type can be represented by more than one lexical format, e.g.100 and 1.0E2 are both valid float formats representing "onehundred". However, rules have been established for this type thatdefine a canonical lexical format,see
一.基于字符串的类型
1.
2.
3.
4.
5.
5种类型,自上而下是派生的关系。
二.数字类型
1.
可使用科学计数法表示;下列值都是有效的:INF(无穷大),-INF(负无穷大)、0(正零)、-0(负零)和NaN(非数字);注:正零大于负零,非数字大于所有其他值,包括正无穷大。
2.
表示任意精度的小数,不同的模式处理器支持的有效位数是不一样的,不过需要最少支持18位有效数字。
.2 和2.以及002和2.00是符合标准的decimal数字。
3.
派生自decimal,表示一任意大的证书,从integer数据类型派生出了其他十二种内置类型,例如Byte,Int等。
三.日期和时间类型
1.
若要表示公园前的年,可以在年之前面添加减号例如-0343-03-22表示公元前343年3月22日。
可以在日期值后添加可选的时区表达式,或者添加字符Z,表示UTC时间。例如:1978-05-04+08:00
2.
3.
4.
5.
6.
7.
8.
9.
年月日小时分钟数都可以是任意的无符号整数,而秒数则可以是任意的无符号小数,除此之外,duration的值还遵循下列的规则:
l
l
l
l
四.其他数据类型
1.boolean有效值为0,1,true,false。
2.anyURI表示同意资源标识符的引用。
3.QName表示XML名称空间限定名,包括一个前缀名一个本地部分,中间用冒号分割,这两部分都是NCName类型。前缀和冒号都是可选的,但是如果使用了前缀,则要求在QName值得适用范围内使用该前缀变量的名称空间的声明,否则将出错。
- XML Schema内置简单类型
- XML Schema中的简单类型
- 疯狂XML学习笔记(9)-------------Schema内置类型
- XML Schema内置数据类型
- XML Schema概述
- 一个简单的XML Schema的例子
- XML学习之Xml Schema:三、自定义简单类型--facet
- XML学习之Xml Schema:四、自定义简单类型
- 内建于XML Schema的简单类型有44种。他们在XML Schema推荐标准的第二部分中公布,下面这是一张内置类型的层次结构图
- XML Schema -XSD 限定
- 疯狂XML学习笔记(8)---------schema 的简单类型
- Schema简单的类型
- XML Schema简单教程
- Xml Schema 之 简易类型
- Xml Schema 之 复合类型
- xml schema数据类型,元素类型
- [XML]学习笔记(五)——XML Schema简单类型元素与属性
- Schema语法之简单类型
- android google map 易错问题
- android使用百度地图api实现gps定…
- java double如何保留小数点后两位
- xml介绍
- XML Schema概述
- XML Schema内置简单类型
- [水]ZOJ1526
- 第一部分 解析起步
- unity处理Android的home键响应事件
- 自定义简单类型
- 复杂类型
- 派生复杂类型
- 一致性约束
- 引入其他的模式文档