Name
xs:element(global definition) — Global element definition that can be referenced within the same schema by other schemas.
Synopsis
<xs:element
abstract = xs:boolean : “false”
block = ( “#all” | list of ( “extension” | “restriction” |
“substitution” ) )
default = xs:string
final = ( “#all” | list of ( “extension” | “restriction” ) )
fixed = xs:string
id = xs:ID
name = xs:NCName
nillable = xs:boolean : “false”
substitutionGroup = xs:QName
type = xs:QName
{any attributes with non-schema namespace}
>
Content: (xs:annotation?, (xs:simpleType | xs:complexType)?, (xs:unique |
xs:key | xs:keyref)*)
</xs:element>
May be included in: xs:schema
Description
All the elements defined at the top level of a schema (i.e.,
xs:element, which is included directly under the
xs:schema document element) are considered
globally defined.
Globally defined elements have a global scope: they can be referenced through their qualified name everywhere in the schema in which they are defined, as well as in any schema that imports or includes this schema. They can also be used as document elements in instance documents.
Elements are identified by their qualified name, but the local name
is expected in the name attribute. The type
definition is performed by assigning a simple or complex datatype to
the element.
This assignment can be done either by reference, using the
type attribute to refer to a simple or complex
datatype by its qualified name, or inline, by embedding the
definition of the simple (xs:simpleType ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access