Bookmark and Share Share

<variables>

A list of variables to use for input, output or to hold any intermediate data or document content in the flow of mashup processing. Variables must be declared as direct children of <mashup>, <macro>, <operation> or any looping statement that can contain other EMML statements.

Variables declared in <mashup> or <operation> have a global scope and are accessible in any statement. Variables declared in <macro> or looping statements have only a statement scope.

[See also Declaring Mashup Variables and Parameters for more information and examples.

Can Contain ( variable+ )
Allowed In mashup, else, elseif, for, foreach, if, macro, operation, sequence, while,

<variable>

One variable to hold input, output or any intermediate data or document content.

Can Contain

Typically empty, but can contain text and any well-formed literal XML.

Attributes

Name Required Description
name yes

The required name for a variable, input parameter or output parameter. Parameter names must be unique within the scope of the mashup script. Names for variables must be unique within the scope of the mashup, if the variable has a global scope, or within the statement in which the variable is declared.

type yes

The required data type for this parameter or variable. Valid values for this include:

  • boolean
  • date
  • document (complex variables that have structure)
  • number
  • string
  • Any token that identifies a data type defined by a service. Tokens are typically used for input or output parameters where the service has metadata for a named datatype.

Input parameters for the mashup script cannot be a document type. Only simple types are supported for mashup input.

service  

The optional name of the service that has metadata defining the data type for this parameter or variable. This is required if the value of the type attribute is a token.

default  

The optional, simple default value to use for this variable, input parameter or output parameter. You cannot set default values for document-type variables or parameters.