602SQL Documentation Index  

XML Data Bound to Variables and Constants

Binding a Variable or Constant Value with an Attribute or a Text in an Element

A variable or constant may be bound to an attribute value (<eform version="1.0">) or with text in an element (<version>1</version>). Use the element context menu command Insert attribute of element or Insert text of element on each position you want to place the value in the XML file.

If you inserted an attribute, specify the name.

In both cases check the Associated with the variable or Constant value checkbox and enter the variable or constant value that should appear in the attribute or text. A string constant must be specified without apostrophes or quotation marks.

NOTE: Client or server variables may be used in the DAD with a different meaning. They may be used as a part of a SQL query or condition restricting record selection for export.

Client and Server Variables

If a client is working with an XML file, the DAD values may be bound to global client variables (e.g. see the Client variable description page for PHP).

If a server is working with an XML file, the DAD values may be bound to variables declared in a stored procedure that called the XML function (or in a global declaration by the Module_globals).

Variable names are written the same way in both cases (WARNING: This is different than the usage of client variables in SQL queries or conditions!). The colon is not used to prefix client variable names and identifiers are not enclosed in grave accents.

DAD Without Tables or Queries

An extreme usage case is to create a DAD that does not contain a query or table. This DAD can only transfer data between the XML file and variables. To accomplish this, design an analytic DAD and do not reference any table.