HTML and CSS Reference
In-Depth Information
Table H-9 XSD Elements
Element Name
Description
all
Indicates child elements can appear in any order (see sequence)
annotation
Indicates the top-level element for schema comments
any
Allows extension of the XML document with elements not defined by the schema
anyAttribute
Allows extension of the XML document with attributes not defined by the schema
appInfo
Contained within an annotation element; holds information to be used by the
application
attribute
Defines an attribute
attributeGroup
Defines an attribute group to be used in complex type definitions
choice
Within a group, choice, sequence, complexType, or restriction elements, only one of
the elements may be present within the element
complexContent
Indicates whether mixed content is allowed; an element of xs:extension allows
mixed, whereas xs:restriction does not allow mixed content
complexType
Defines a complex type element
documentation
Contained with the annotation for comments about the schema
element
Defines an element
extension
Extends an existing simpleType or complexType element
ield
An XPath expression used by unique, key, or keyref
group
Defines a group of elements used in a complex type definition
import
References schemas for namespace for additional namespace definitions
include
Used to break large schemas into smaller parts
key
Indicates an attribute or element value as a key that must be unique
keyref
Defines constraints on specified key or unique element
list
Available only in a simple type element to specify a list of values to be used in content
notation
Allows the format of non-XML data
redefine
Redefines simple, complex types, and groups (see include)
restriction
Defines restrictions on a simpleType, simpleContent, or a complexContent to clarify
domains (valid ranges)
schema
Defines the root element of a schema
selector
Selects a set of elements for an identity constraint (see key, unique, keyref)
sequence
Indicates that the child elements must appear in a sequence.
simpleContent
Used in complexType elements to define simple content such as text and attributes
simpleType
Defines a simple type and specifies the constraints and information about the values
of attributes or text-only elements
union
Allows creation of simple type as a collection (union) of more than one type of data
unique
Indicates that an element or an attribute value must be unique within the document
Simple Types
A simple element is an XML element that does not contain any other elements or
attributes. In the XSD, the <element> tag declares the name of the element and its data
type. A sample simple XML element and its associated schema is shown in Table H-10.
Table H-10 Simple Type Element
Simple XML Element
XML Schema
an XML element that contain only text
<irst_name>Bill</irst_name>
<xs:element name="irst_name" type=" xs:string" />
Search WWH ::




Custom Search