Simple Macro to convert a doc to a string... Something wrong?

michael.rollins's picture
User offline. Last seen 18 weeks 6 days ago. Offline
Joined: 01/07/2009
Points: 231

Here's my macro library:

<macros xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.jackbe.com/2008-03-01/EMMLSchema ../src/schemas/EMMLSpec.xsd"
        xmlns="http://www.jackbe.com/2008-03-01/EMMLSchema"
        name = "CASMMacros">
   
    <macro name='ConvertXMLDocToString'>
        <input name='inputDoc' type='document'/>
        <ouput name='result' type='string'/>
       
        <assign fromvariable='$inputDoc' outputvariable='$result'/>
       
        <presto-meta name='macrotype'>user</presto-meta>
        <presto-meta name='help'>
            <description>Convert an XML document into a string (with all of the XML structure intact)</description>
            <parameters>
                <paramater name='document'>The XML document to be converted to a string</paramater>
            </parameters>
        </presto-meta>
    </macro>
</macros>

I placed this file into presto/WEB-INF/classes then added the following include to the top of global.emml-macros:

<include filename='CASMMacros.emml-macros'/>

I restarted my server.

Unfortunately, when I attempt to use any mashup that I've created I get an error that states that the ConditionalInvoke macro cannot be found.  I'm thinking that something is wrong with my macro and the fact that it's included at the top of the global macro file is what's causing the ConditionalInvoke to not be seen.

0
Your rating: None
raj
raj's picture
User offline. Last seen 2 days 4 hours ago. Offline
Joined: 09/22/2008
Points: 2

Michael,

Can u confirm if the <include/> is enclosed within the <macros/> root element i.e.,

<macros xmlns="http://www.jackbe.com/2008-03-01/EMMLSchema"        xmlns:myfunc="java:com.jackbe.jbp.jems.client.EMMLPrestoFunctions">
   
     <include filename='CASMMacros.emml-macros'/>
   
     <macro name="ConditionalInvoke">
               ................

raj.  chief masher @ jackbe

smitchell's picture
User offline. Last seen 1 week 2 days ago. Offline
Joined: 08/29/2008
Points: 4

This may not be the, but it is the only syntax error I can see in your macro library. <paramater> should be <parameter> within <presto-meta name="help">.

Sara, technical writer/jackbe

 

michael.rollins's picture
User offline. Last seen 18 weeks 6 days ago. Offline
Joined: 01/07/2009
Points: 231

Raj.  It was included within the <macros> element.

Sara, I'll see if that is what was causing the difficulties.  I actually included it directly into the global macros file and it appeared in my "actions" list, but then it started causing all kinds of other problems.

At any rate, this was only a path that I went down to try to solve my larger problem (converting a document into a string).  Since that has been solved on another thread (of which you're both taking part) I'll work on that from here on out.  If you need me to look at the include problem, please let me know.