Creating a Macro Library
Macro libraries are simply XML files that contain macro declarations that can be used in any mashup script that is deployed in the EMML Reference Runtime Engine where the library is deployed.
Every OMA runtime reference implementation has a built-in macro library named global.emml-macros with some built-in macros.
Steps:
Open a new XML file and:
Insert a <macros> element as the root element.
Define the name for the macro library in the name attribute.
Add the EMML namespace. See EMML Namespaces for the exact namespace to use.
If needed, add the xsi:schemaLocation attribute to point to the EMML schema and the namespace for XML Schema instance.
For example:
<?xml version="1.0" ?> <macros name="myMacroLibrary" xmlns="http://www.openemml.org/2009-04-15/EMMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openemml.org/2009-04-15/EMMLSchema ../schema/EMMLSpec.xsd"> </macros>
Add a <macro> element for each macro you want to define in the library.
See <macro> for instructions on completing macro definitions.
Save the macro library file.
Tip: it is a good practice to use a naming convention, such as macro-library-name.emml-macros for your macro libraries.
Once all the macros in the library are complete and tested:
Deploy the library to the EMML Engines where this library should be available. See Deploying Macro Libraries in an EMML Engine for instructions.
Restart the EMML Engine.
Enterprise Mashup Markup Language (EMML) Documentation is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.
