博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

XML Schema

Posted on 2011-04-07 17:52  脚印  阅读(397)  评论(0编辑  收藏  举报

Restrictions for Datatypes
对数据类型的约束

Constraint
约束
Description
说明
enumeration Defines a list of acceptable values
定义了一系列的有效值
fractionDigits Specifies the maximum number of decimal places allowed. Must be equal to or greater than zero
指定了允许的小数位数的最多位数。必须大于等于0
length Specifies the exact number of characters or list items allowed. Must be equal to or greater than zero
指定了允许的字符或列表项的个数。必须大于等于0
maxExclusive Specifies the upper bounds for numeric values (the value must be less than this value)
指定了数值的上限(数值要比这个值小)
maxInclusive Specifies the upper bounds for numeric values (the value must be less than or equal to this value)
指定了数值上限(数值必须小于等于这个值)
maxLength Specifies the maximum number of characters or list items allowed. Must be equal to or greater than zero
指定了所允许的字符或列表项的最多个数。必须大于等于0
minExclusive Specifies the lower bounds for numeric values (the value must be greater than this value)
指定了数值的下限 (数值要比这个值小)
minInclusive Specifies the lower bounds for numeric values (the value must be greater than or equal to this value)
指定了数值的下限(数值必须大于等于这个值)
minLength Specifies the minimum number of characters or list items allowed. Must be equal to or greater than zero
指定了所允许的字符或列表的最少个数。必须等于大于0个
pattern Defines the exact sequence of characters that are acceptable
定义了符合要求的字符的确切排列顺序
totalDigits Specifies the exact number of digits allowed. Must be greater than zero
指定了所允许的字符的确切个数。必须大于0
whiteSpace Specifies how white space (line feeds, tabs, spaces, and carriage returns) is handled
指定了空白该怎样被处理(换行符,制表符,空格符和回车符)

 

 

 

String Data Types
字符串数据类型

Note that all of the data types below derive from the String data type (except for string itself)!
要注意下面所有的数据类型都是从字符串数据类型里派生出来的(除了字符串本身)

Name
名称
Description
解释
ENTITIES
ENTITY
ID A string that represents the ID attribute in XML (only used with schema attributes)
象征XML的ID属性的字符串(只用在schema属性里)
IDREF A string that represents the IDREF attribute in XML (only used with schema attributes)
象征XML里的IDREF属性的字符串(只能和schema属性一起使用)
IDREFS
language A string that contains a valid language id
含有正确的语言ID的字符串
Name A string that contains a valid XML name
含有一个有效的XML名称的字符串
NCName
NMTOKEN A string that represents the NMTOKEN attribute in XML (only used with schema attributes)
象征XML里的NMTOKEN属性的字符串(只能和schema属性一起使用)
NMTOKENS
normalizedString A string that does not contain line feeds, carriage returns, or tabs
不含有换行符,回车符或制表符的字符串
QName
string A string
一个字符串
token A string that does not contain line feeds, carriage returns, tabs, leading or trailing spaces, or multiple spaces
不含有换行符,回车符,制表符,头尾空格,或重复空格的字符串