| ILOG JRules User Guide > Integrating Application Data > Reference > Mapping Between XML Schema and Dynamic Classes > XML Declarations > Appinfo |
Appinfo |
PREVIOUS NEXT |
Schema appinfo structures are automatically mapped on XOM properties when the name is equal to "http://www.ilog.com/rules/xml".
The following example shows how a simple appinfo is translated in the XOM.
Here is the schema:
<appinfo xmlns:irl="http://www.ilog.com/rules/xml"> <irl:property name="property1">property1Value</irl:property> </appinfo>
Here is the XOM representation:
property property1 "property1Value"
The following example demonstrates how to create class properties using appinfo. It maps a complex type book that has properties of bookRenderer and position.
Here is the schema:
<complexType name="book">
<annotation>
<appinfo xmlns:irl="http://www.ilog.com/rules/xml">
<irl:property name="bookRenderer">Renderer1</irl:property>
<irl:property name="position">
<irl:property name="x">10</irl:property>
<irl:property name="y">20</irl:property>
</irl:property>
</appinfo>
</annotation>
<sequence>
<element name="ident"/>
<element name="title"/>
</sequence>
</complexType>
Here is the XOM representation:
class Book extends IlrXmlObject
{
property bookRenderer "Renderer1"
property position {
x "10",
y "20"
}
String ident;
String title;
}
The following example demonstrates how to create field properties using appinfo. It maps a complex type book that has properties of bookRenderer and position to the field named ident.
Here is the schema:
<complexType name="book">
<sequence>
<element name="ident">
<annotation>
<appinfo xmlns:irl="http://www.ilog.com/rules/xml">
<irl:property name="bookRenderer">Renderer1</irl:property>
<irl:property name="position">
<irl:property name="x">10</irl:property>
<irl:property name="y">20</irl:property>
</irl:property>
</appinfo>
<annotation>
</element>
<element name="title"/>
</sequence>
</complexType>
Here is the XOM representation:
class Book extends IlrXmlObject
{
String ident
property bookRenderer "Renderer1"
property position {
x "10",
y "20"
};
String title;
}
| Copyright © 1987-2008 ILOG S.A. All rights reserved. Legal terms. Documentation homepage. | PREVIOUS NEXT |