Name
xs:element
Synopsis
<xs:element abstract = "( true |false
)" block = "( #all | extension | restriction | substitution )" default = "string
" final = "( #all | extension | restriction )" fixed = "string
" form = "( qualified | unqualified )" id = "ID
" maxOccurs = "(nonNegativeInteger
| unbounded )" minOccurs = "nonNegativeInteger
" name = "NCName
" nillable = "( true |false
)" ref = "QName
" substitutionGroup = "QName
" type = "QName
"> <!-- ( xs:annotation?, ((xs:simpleType | xs:complexType)?, (xs:unique | xs:key | xs:keyref)*) ) --> </xs:element>
The xs:element
element
declares an element, including its name and type. Used at the top
level of the schema, it indicates a potential root element. Used
inside an xs:complexType
element, it indicates a potential child element of another
element. Alternately, instead of specifying a name and a type, it
can have a ref
attribute that
points to a top-level element declaration elsewhere in the
schema.
Attributes
abstract
, optionalIf the
abstract
attribute has the valuetrue
, then only elements from this element’s substitution group are allowed in instance documents, not elements actually declared by this declaration.default
, optionaldefault
is the default value of the element reported for empty elements matching this declaration in the instance document.block
, optionalIf the
block
attribute contains the valueextension
orrestriction
, then this element cannot be replaced in instance documents by instances of subtypes derived from this element’s ...
Get XML in a Nutshell, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.