5.3. Elements and Attributes
An occurrence of xs:element specifies an element. It must have a “name” attribute or a “ref” attribute, but not both. If a “name” attribute appears, then a “type” attribute can appear. The value of a “type” attribute is the name of a type, either simple or complex; it specifies that the element will be of that type. The value of a “ref” attribute is the name of a global element; it indicates that the element being specified, presumably as part of a structure, has the same name and type as does the global element. In the absence of either a “type” or “ref” attribute, the element specification must contain an anonymous type (described later), or it will default to type “anyType” (also described later).
Schema elements ...
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