Calling Macros From Another Macro
Calling a macro from within another macro has the same requirements of calling a macro from a mashup:
If the macro belongs to a user-defined domain, including the
Macro Domains.
Using the macro reference statement.
For example:
<macro name="reusableMacroWithNestedCall"
xmlns:presto="http://www.jackbe.com/v1.0/EMMLPrestoExtensions"
xmlns:macro="http://www.openmashup.org/schemas/v1.0/EMMLMacro">
<input name="currentUser" type="string" />
<output name="macroResult" type="string"/>
<variable name="currentActivity" type="document"/>
<variable name="updatedPoints" type="number"/>
<!-- logic to determine current activity, assign to $currentActivity -->
<include domain="UserMath"/>
<macro:calculatePoints domain="UserMath" thisUser="$currentUser"
activity="$currentActivity" outputvariable="updatedPoints"/>
<display console="true" message="Updated points are"
variable="$updatedPoints"/>
...
</macro>