| ILOG JRules User Guide > Integrating Application Data > Reference > Mapping Between XML Schema and Dynamic Classes > Schema Types > Extension of Simple Type Content in Complex Types |
Extension of Simple Type Content in Complex Types |
PREVIOUS NEXT |
This example shows how to 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 ;
...
}
| Copyright © 1987-2008 ILOG S.A. All rights reserved. Legal terms. Documentation homepage. | PREVIOUS NEXT |