<!ATTLIST IMPORT relation IDREF #REQUIRED class IDREF #IMPLIED idref IDREF #REQUIRED> |
Attribute | Mand. | Description | Default |
relation | yes | Relation that refers to the classes containing the field to import. | |
class | no | Class pointed by the relation and containing the field to import. If the relation refers to a single class or if all the referred classes are accepted, this attribute does not need to be set. | |
idref | yes | Id of the field to import from the class(es) referred by the relation. |
<!ELEMENT IMPORT (FILTER | FILTER_REF)?> |
Element | Mand. | Mult. | Description |
FILTER | yes | no | Filter used to limit objects taken into account in the import. |
FILTER_REF | yes | no | Reference of the filter used to limit objects taken into account in the import. |
<IMPORT relation="item" idref="itemUnitPrice"/> If the relation is multiple and the imported field has type NUMBER, the function associated to that number field is used to compute the value of the field that specifies the import. Imagine that we have a class Invoice that contains a relation items pointing to a list of Invoice Items and that this last class has a numeric field amount with the SUM function associated to it, in that case it is possible to define a field total on Invoice by simply defining an import of the amount field on Invoice Items and using the items relation of Invoice. <IMPORT relation="items" class="InvoiceItem" idref="amount"/> |