Extension of simple type content in complex types
You can extend simple type content in a schema and an XML document.
The example extends temperature of base type int to include a unit attribute of type string.
Here is the schema:
<complexType temperature>
<simpleContent>
<extension base="int">
<attribute name="unit" type="string"/>
</extension>
</simpleContent>
</complexType>
Here is the excerpt from an XML document:
<temperature unit= "celsius">15</temperature>
Here is the XOM representation:
Class Temperature extends IlrXmlObject
{
int content ;
String unit ;
…
}