XSD Text-Only
A text-only complex element can contain text and attributes.
Text-Only Complex Elements
This type contains only simple content (text and attributes), so we add a simpleContent element to this content. When using simple content, we must define either an extension or a restriction inside the simpleContent element, like this:
....
....
or:
....
....
Tip: Use the extension or restriction element to extend or limit the basic simple type of an element. Here is an example of an XML element, "shoesize", that contains only text:
The following example declares a complex type whose content is defined as an integer value, and the "shoesize" element has an attribute named "country":
We can also give the complexType element a name and let the type attribute of the "shoesize" element refer to this name (by using this method, several elements can refer to the same complex type):