<script>
This statement includes scripting code to execute as the mashup script is processed. Script code can be included as the content of <script> or <script> can import code from an external file from the local server.
Note: JavaScript and JRuby are supported as scripting languages.
For more information and examples, see Adding User-Defined Scripting Code to Mashups.
| Can Contain | The JavaScript code to execute. Inline scripting is only supported for JavaScript. If no inline code is provided, you must specify a source file for the code to execute. |
| Allowed In | mashup, else, elseif, for, foreach, if, macro, operation, sequence, while, |
Attributes
| Name | Required | Description |
|---|---|---|
| type | yes | The MIME type of the scripting language used, such as 'text/javascript'. |
| src | The local file with the scripting code to include and execute here. This is required for JRuby scripts and optional for JavaScript. If omitted for JavaScript scripts, the content of <script> should contain the scripting code to run. |
|
| application | An optional attribute identifying a folder containing JAR files with Java classes that are used within this script code. The EMML Engine loads classes from this application folder first. Applications allow POJO services to use third-party libraries that may conflict with your Java application's libraries. Application folders must be deployed in the Application Server hosting the EMML Engine. |
|
| inputvariables | A list of mashup variables separated by commas that the script should have acccess to. |
|
| outputvariable | The mashup variable to contain the result of the script. |
Enterprise Mashup Markup Language (EMML) Documentation is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.
