Each class defined in the Configuration:SPML object typically has an associated form object containing the rules for transforming between the external attribute model defined by the class and the internal model defined by the associated view.
The following example shows how the standard person class references a form.
<Configuration name='SPMLPerson'> <Extension> <Form> <Field name='cn'> <Derivation><ref>global.fullname</ref></Derivation> </Field> <Field name='global.fullname'> <Expansion><ref>cn</ref></Expansion> </Field> <Field name='email'> <Derivation><ref>global.email</ref></Derivation> </Field> <Field name='global.email'> <Expansion><ref>email</ref></Expansion> </Field> <Field name='description'> <Derivation> <ref>accounts[Lighthouse].description</ref> </Derivation> </Field> <Field name='accounts[Lighthouse].description'> <Expansion><ref>description</ref></Expansion> </Field> <Field name='password'> <Derivation><ref>password.password</ref></Derivation> </Field> <Field name='password.password'> <Expansion><ref>password</ref></Expansion> </Field> <Field name='sn'> <Derivation><ref>global.lastname</ref></Derivation> </Field> <Field name='global.lastname'> <Expansion><ref>sn</ref></Expansion> </Field> <Field name='gn'> <Derivation><ref>global.firstname</ref></Derivation> </Field> <Field name='global.firstname'> <Expansion><ref>gn</ref></Expansion> </Field> <Field name='telephone'> <Derivation> <ref>accounts[Lighthouse].telephone</ref> </Derivation> </Field> <Field name='accounts[Lighthouse].telephone'> <Expansion><ref>telephone</ref></Expansion> </Field> </Form> </Extension> </Configuration> |
SPML class forms
Contain no <Display> elements
Are only defined for data transformation
Are not intended for interactive editing
Each attribute in a class definition contains two field definitions:
One field uses a <Derivation> expression to transform the internal view attribute name to the external name.
One field uses an <Expansion> expression to transform the external name to the internal name.
The form is processed in such a way that when attributes are returned to the client, only the result of the <Derivation> expressions are included. When attributes are being sent from the client to the server, only <Expansion> expression results are assimilated back into the view. The effect is similar to the schema map of a Resource definition.