YouTip LogoYouTip

El Simpletype

# XML Schema simpleType Element * * Complete XML Schema Reference Manual](#) * * * ## Definition and Usage The `simpleType` element defines a simple type, specifying information about the values of elements or attributes with pure text content, as well as constraints on them. ### Element Information * **Parent Elements:** attribute, element, list, restriction, schema, union ### Syntax ```xml (annotation?,(restriction|list|union)) (The `?` symbol indicates that the element can appear zero or one time within the `simpleType` element.) | Attribute | Description | | --- | --- | | id | Optional. Specifies a unique ID for this element. | | name | The type name. This name must be a non-colonized name (NCName) as defined in the XML namespace specification. If specified, it must be unique among all `simpleType` and `complexType` elements. If the `simpleType` element is a child of the `schema` element, it is required; otherwise, it is not allowed. | | any attributes | Optional. Specifies any other attributes with non-schema namespaces. | ### Example 1 This example declares the `age` element as a simple type with constraints. The value of `age` cannot be less than 0 or greater than 100: ```xml * * * [![Image 4: XML Schema Reference Manual]
← El UnionEl Simplecontent β†’