Section - 2 : Referencing DAL and GVM Using XML


The system lets you reference the GVM and DAL expressions before it rebuilds XPath search masks. The format is as follows:

=XXX(expression)

where XXX is one of the supported ways of finding data from a symbol, such as DAL or GVM.

Here are the standard access methods:

  • =(“expression”) returns the value of a DAL symbol represented by expression

    Here is an example:

    !/Forms/Data1[Data2="**=("dalVar")**"]/Data3

    dalVar is a DAL symbol. If the value of this variable is Two, the system resolves the expression and returns the following XPath search mask:

    !/Forms/Data1[Data2="Two"]/Data3

  • =(expression) returns the value of a DAL variable named in the expression which contain a name of another DAL variable.

    Here is an example:

    !/Forms/Data1[Data2="**=(dalVar2)**"]/Data3

    If you assign dalVar2 equal to another DAL variable called dalVar which holds a value of Two, here is the result:

    !/Forms/Data1[Data2="Two"]/Data3

  • =DAL(“expression”) returns the value of a DAL script named by expression.

    Here is an example:

    !/Forms/Data1[Data2="**=DAL("test.dal")**"]/Data3

    The system runs the named DAL script and returns the value as a result of that run. If test.dal returns a value of Three, the expression is resolved and this XPath search mask is the result:

    !/Forms/Data1[Data2="Three"]/Data3

  • =GVM(“expression”) returns the value of a GVM symbol named by the expression.

    Here is an example:

    !/Forms/Data1[Data2="**=GVM("gvmVar")**"]/Data3

    gvmVar is a GVM symbol. If the value for this symbol is One, the system resolves the expression and returns this XPath search mask:

    !/Forms/Data1[Data2="One"]/Data3

  • =GVM(expression) returns the DAL or GVM variable named in the expression which contains a name of another GVM variable.

    Here is an example:

    !/Forms/Data1[Data2="**=GVM(dalVar)**"]/Data3

    dalVar is a DAL variable. If dalVar was assigned a value equal to another GVM variable called gvmVar and the value for this variable is One, here is the result:

    !/Forms/Data1[Data2="One"]/Data3

    !/Forms/Data1[Data2="**=GVM(gvmVar2)**"]/Data3

    gvmVar2 is a GVM variable. If gvmVar2 was assigned a value equal to another GVM variable called gvmVar and the this variable holds a value of One, here is the result:

    !/Forms/Data1[Data2="One"]/Data3

  • =() Retrieves the contents of a DAL variable that is, by default, the root name of the source name of the current DDT field.

    Here is an example:

    !/Forms/TestGVM[GVMField="**=()**"]/Data

    Assume, current DDT field has destination name dalVar #003 and also source name dalVar #003 and the content of this DAL variable, dalVar, is One, the system resolves the expression and returns this XPath search mask:

    !/Forms/TestGVM[GVMField="One"]/Data

If you have GVM, DAL, or other symbols in the XPath, you may want to know what symbolic data you are referencing. Use these INI options to have the system write the symbol and its referred data into the log file:

< Debug_Switches >

Enable_Debug_Options = Yes

XPath = Yes