<display> Examples
You define static text for the message in the message attribute. You can also optionally include a dynamic value at the end of the message with either the expr attribute and an XPath 2.0 expression or with the variable attribute which points to a variable. For example:
<display message="testing debugging messages"/>
<display message="filtered result =" variable="$result"/>
<display message="sum =" expr ="$firstNum + $secondNum"/>
Output always appears in the console. However, logging the results of <display> is controlled by the logging level of the application server hosting the MashZone NextGen Server. Output for <display> is only logged if the level is INFO or lower.
To force logging for <display> statements, add the console attribute:
<display console="true" message="sum =" expr="$firstNum + $secondNum"/>
If you want to turn off debug messages for production, enclose the <display> commands in XML comments, such as:
<!-- <display message="debug message"/> -->
Or remove them from production mashup scripts.
EMML 'stream' variables can be displayed using display statement with type='stream' and previewcount='<n> or ALL' attributes.
Sample uses,
<display message="display 2 records in mfgStream ="
type="stream" variable="$mfgStream" previewcount="2"/>
<display message="display 5 records in mfgStream ="
type="stream" variable="$mfgStream" previewcount="5"/>
<display message="display all records in mfgStream ="
type="stream" variable="$mfgStream" previewcount="all"/>
Working Samples
Most of the sample mashups for
MashZone NextGen use the <display> statement. See
Mashup Samples for a list of
MashZone NextGen mashup samples and where to find them.