Bookmark and Share Share

EMML Reference

This topic lists EMML declarations and statements with links to their syntax topics.

<annotate>

Adds attributes or children elements to a selected node of a variable and assigns values using an XPath expression. This is typically used to add metadata to the mashup result or any intermediate variable.

<appendresult>

Appends a well-formed structure of nodes to the result of this mashup or to any intermediate variable. This is typically used in repeating loops to handle results with repeated sections.

<assert>

Defines a logical assertion comparing variable, literals, counts or element depths. Assertions must be true to continue mashup processing.

<assign>

Copies, and optionally transforms, one variable or variable fragment to another variable. This uses XPath 2.0 expressions to identify the source nodes to copy and optionally applies XPath functions to transform the result.

This statement can also assign literal values.

<break>

To explicitly break out of looping statements.

<constructor>

Creates a well-formed structure for the result of this mashup or for any intermediate variable. You define the nodes of the result and use mashup expressions to define the data from a variable to fill these nodes.

<datasource>

Defines connection information to one database for use with direct SQL commands. See Declaring Data Sources.

<directinvoke>

Invokes a publically-accessible service or web site.Only REST, SOAP or syndication (RSS or Atom) services are currently supported.

<display>

Sends a message to the log and console, optionally including the value of a variable or portion of a variable defined in an XPath 2.0 expression

<emml-meta>

Defines metadata for the mashup specific to EMML. See Adding Metadata to Mashups.

<filter>

Filters a set of nodes in a variable based on a filter expression in XPath 2.0.

<for>

Processes a loop of mashup statements based on a count.

<foreach>

Processes a loop of mashup statements based on a set of nodes from a variable. The set of nodes is an XPath 2.0 'sequence' defined by an expression.

Loops may be processed sequentially (the default) or concurrently.

<group>

Sorts, and optional filters, a set of nodes in a variable and constructs a result document based on those groups. This command supports multiple levels of grouping and calculations or other transformations on groups.

<if>

Handles if-elseif-else processing for a mashup script based on a condition defined in XPath 2.0. You can include any mashup statement in any section of <if>.

<include>

To make common macros from a macro library file accessible in a specific mashup script or in another macro library. See also Including Macro Libraries in Mashup Scripts or Macro Libraries

<input>

Defines a parameter to use as the input to a mashup or macro. See Declaring Mashup Variables and Parameters.

<invoke>

Reserved for future use to invoke services that are hosted or governed by another system and thus may not be publically accessible.

<join>

Joins the results of two or more services based on a join condition. This statement works much like a database join, where the results may be disparate but must have key nodes that determine how data is joined. You can also define the structure and nodes to include in the result of the join.

<macro>

Allows you to define custom mashup statements for use in one or many mashups. You can use virtually mashup statement in a macro, although macros cannot be nested.

<macros>

Root node for macro libraries that contain macro definitions for use in any mashup. See also Creating a Macro Library.

<macro:custom-macro-name>

To use a custom mashup statement. See also Calling a Macro in a Mashup Script.

<mashup>

The root element for a mashup script.

<merge>

Merges the results of two or more services that have homogenous result models. This statement works much like a database union. The results of all services must have identical structures.

<output>

Defines the name and type for the result of this mashup. See Declaring Mashup Variables and Parameters.

<operation>

An optional name for the mashup service operation.

<parallel>

Processes each <sequence> child concurrently as separate parallel flows. Statements within <sequence> are processed sequentially.

<sequence> can contain variable declarations and other mashup statements.

<script>

Calls a user-defined script to execute at runtime at the specified location in mashup processing. You can include scripting code directly or point to an external file on the local server.

<select>

Creates a structure for the mashup result or for an intermediate variable with only selected nodes from a repeating set of items.

<sort>

Sorts a set of nodes in a variable based on sort keys and a sorting expression in XPath 2.0.

<sql>

Executes SQL queries directly against a datasource. You can also use this statement to invoke stored procedures that return result sets.

<sqlBeginTransaction>

Begins a transaction for SQL commands to a single datasource. See SQL Transactions.

<sqlCommit>

Commits a transaction for SQL commands to a single datasource. See SQL Transactions.

<sqlRollback>

Rolls back a transaction for SQL commands to a single datasource. See SQL Transactions.

<sqlUpdate>

Executes any other SQL statement against a datasource. You can also use this statement to invoke stored procedures that do not return result sets.

<template>

Defines XPath expressions dynamically that can be passed into generic mashup scripts. See Dynamic Mashup Syntax.

<user-meta>

Allows you to define your own metadata for a mashup or macro. See Adding Metadata to Mashups.

<variables>

Contains one or more definitions of variables to hold the input, output or intermediate data for any mashup statement . See Declaring Mashup Variables and Parameters.

<while>

Processes a loop of any mashup statements as long as the specified condition is true. The condition is defined in an XPath 2.0 expression.

xmlns on <mashup> or <macro>

Declares a namespace used in a mashup script or macro. See Declaring Namespaces.

<xslt>

Transforms an document-type input variable using an XSLT 2.0 stylesheet.

In addition, the following common content model groups are used in many EMML statements: Declarations Group, Macroincludes Group, Statements Group and Variables Group.

Declarations Group

Declarations define the parameters and meta data used within a mashup. This includes input and the result of the mashup. Meta data may be user- or system-defined. See also the Variables Group for additional declarations.

Valid content for this group is any choice of the following:

  • emml-meta
  • input
  • output
  • user-meta

Macroincludes Group

Macros define custom statements for use in a specific mashup or in any mashup hosted by a given EMML Engine. They are 'mini-mashups.'

Include statements allow you to include macro definitions from a macro library in a mashup or in another macro library.

Valid content for this group is any choice of the following:

  • include
  • macro

Statements Group

Statements are the actions that the mashup performs.

Valid content for this group is any choice of the following:

  • annotate
  • appendresult
  • assign
  • assert
  • constructor
  • directinvoke
  • display
  • filter
  • for
  • foreach
  • group
  • invoke
  • if
  • join
  • merge
  • parallel
  • script
  • select
  • sort
  • sql
  • sqlBeginTransaction
  • sqlCommit
  • sqlRollback
  • sqlUpdate
  • template
  • while
  • xslt

Variables Group

This group contains additional declarations that define variables and datasources that are used within a mashup. See the Declarations Group for other types of declarations.

Valid content for this group is any choice of the following:

  • datasource
  • variables
  • variable