定义对 simpleContent 定义的约束。
<restriction
base = QName
id = ID
{any attributes with non-schema Namespace}...>
Content: (annotation?, (simpleType?, (minExclusive | minInclusive |
maxExclusive | maxInclusive | totalDigits |fractionDigits | length |
minLength | maxLength | enumeration | whiteSpace | pattern)*)?,
((attribute | attributeGroup)*, anyAttribute?))
</restriction>
特性
base
在该架构(或由指定的命名空间指示的其他架构)中定义的内置数据类型、simpleType 元素或 complexType 元素的名称。 包含 restriction 元素的元素是从基值所指定的类型派生的。base 是内置数据类型、简单类型或复杂类型的名称。 如果有复杂类型,则此类型必须是以下类型之一:内置数据类型、简单类型或简单内容。
基值必须是限定名 (QName)。
必选。
id
该元素的 ID。 id 值必须属于类型 ID 并且在包含该元素的文档中是唯一的。可选。
元素信息
出现次数 |
一次 |
父元素 |
|
内容 (simpleContent) |
annotation、fractionDigits、enumeration、length、maxExclusive、maxInclusive、maxLength、minExclusive、minInclusive、minLength、pattern、simpleType、totalDigits、whiteSpace、attribute、attributeGroup、anyAttribute |
示例
以下示例说明 simpleContent 定义,该定义限制其他的 simpleContent 扩展。 值集被限制为值和特性的短列表。