A complex text-only element can contain attributes and text.
Complex Text-Only Elements
This type contains only simple contents (text and attributes),
therefore we add simpleContent element around the content.
When using simple contents, you must define an extension OR a restriction within the simpleContent element,
like this:
Look at the FLWOR expressions which is given below:
Tip: Use the extension/restriction element to limit or to expand the base simple type for the element.
Here is an example of an XML element, "shoesize", that contains only text:
<shoesize country="france">35</shoesize>
The following example declare a complexType, "shoesize".
The contents are defined as an integer value, and the "shoesize" element also contains an attribute
named "country":
We could also give the complexType element as a name, and let the "shoesize" element
have a type attribute that refers to the name of the complexType (if you use this method,
several elements can refer to the same complex type):