| Workshops --> XML --> Demo --> schema11.html |
|---|
![]() |
|
This is an element that can be defined in terms of other elements, attributes, and text
This is in contrast to the simple type, which can only contain content
Other elements, attributes, and no text
Other elements, attributes, and text
Attributes and text
Nothing (empty) and attributes
Because two elements are used here, the element xsd:sequence is used, which sets the order of the sibling elements
This is an example of a complex type element
In the XML file, it would look like this
It is also possible to define a complex type element so that is can be used as an attribute in other complex type elements.
Because two elements are used here, the element xsd:sequence is used, which sets the order of the sibling elements
Also, this complexType is global because it has been named (as a ...Type) and is not attached to any element
An example is:
And here's how it might be called in the schema
In the XML file, this element would look like this
The generic form is:
An example is
To use this complexType in the definition of an element, it must be called
In the XML file, this element would look like this
|
||||||||||||||||||||||||
| Page by Howard Rosenbaum | |
| Find me at hrosenba@indiana.edu | You are here: http://www.slis.indiana.edu/hrosenba/www/Workshops/XML/Demo/schema11.html |