An
EXPRESSION
element instructs Forge about how to modify
records. An expression consists of an
EXPRESSION
element with
TYPE
and
NAME
attributes.
Expressions may contain
EXPRNODE
sub-elements, which have
NAME
and
VALUE
attributes, to supply additional configuration
information. Expressions may also contain other expressions; the contained
expressions may provide values used by the containing expression, or the
containing expression may provide control over which of the contained
expressions are evaluated.
Oracle recommends that you perform record manipulation with a Perl
manipulator rather than use a record manipulator and
EXPRESSION
elements. However, if you need to access
and modify dimension sources (such as a dimension adapter or dimension server),
you should still use expressions such as
DVAL PERL
. The Perl manipulator does not access
dimension sources. For more information about using a Perl manipulator, see the
Developer Studio Help.
<!ELEMENT EXPRESSION ( COMMENT? , EXPRBODY? , (EXPRNODE | EXPRESSION)* ) > <!ATTLIST EXPRESSION TYPE ( PROPERTY | DVAL | INTEGER | STRING | STREAM | VOID | FLOAT) #REQUIRED NAME CDATA #REQUIRED LABEL CDATA #IMPLIED URL CDATA #IMPLIED >
TYPE
- Describes the return value for the expression. For example, aFLOAT
expression returns a floating point number. The valid values forTYPE
are as follows:PROPERTY
,DVAL
,INTEGER
,STRING
,VOID
, andFLOAT
.Note
STREAM
is used internally by the MDEX Engine.NAME
- Describes the operation being performed. Expressions are typically referred to by the combination of theirTYPE
andNAME
values (for exampleDVAL CONST
). This combination helps to distinguish cases where there are several expressions with differentTYPE
values but the sameNAME
value (for example,DVAL CONST
,FLOAT CONST
, andINTEGER CONST
).URL
- Used inPERL
expressions. Specifies the URL (file) from which an expression can read Perl code. The code can be up to 65534 characters long.
Sub-element |
Description |
---|---|
|
Associates a comment with a parent element and preserves the comment when the file is rewritten. This element provides an alternative to using inline XML comments of the form . |
|
Contains Perl code that manipulates records. |
|
Provides a generic way of sending a variety
of information to an
|
|
Instructs Forge about how to modify records. |
This example shows a mathematical expression that adds two constant values (5 and 6).
<EXPRESSION TYPE="INTEGER" NAME="MATH"> <EXPRNODE NAME="TYPE" VALUE="INTEGER"/> <EXPRNODE NAME="OPERATOR" VALUE="ADD"/ <EXPRESSION TYPE="INTEGER" NAME="CONST"> <EXPRNODE NAME="VALUE" VALUE="5"/> </EXPRESSION> <EXPRESSION TYPE="INTEGER" NAME="CONST"> <EXPRNODE NAME="VALUE" VALUE="6"/> </EXPRESSION> </EXPRESSION>
This example adds a dimension value ID to the current record. The dimension value ID is determined by the mapping between the value of the P_Score property in the source data and the dimension values contained in the dimension with ID equal to 9.
<EXPRESSION NAME="ADD_DVAL" TYPE="VOID"> <EXPRESSION NAME="MATCH" TYPE="DVAL"> <EXPRNODE NAME="DIMENSION_ID" VALUE="9"/> <EXPRESSION NAME="IDENTITY" TYPE="PROPERTY"> <EXPRNODE NAME="PROP_NAME" VALUE="P_Score"/> </EXPRESSION> </EXPRESSION> </EXPRESSION>