Does anyone know what the rules are around declaration of variables in an enclosing emml script are for Groovy code execution?
The following Groovy code executes fine in the Groovy Console (1.6.5):
import groovy.xml.* def writer = new StringWriter() def bldr = new groovy.xml.MarkupBuilder(writer) bldr.text() {mkp.yieldUnescaped '<'+'![CDATA[some text]]'+'>'} String xmlStringHolder = writer byte[] xmlBytes = xmlStringHolder.getBytes("UTF8") xmlGString = new String(xmlBytes,"UTF8") println xmlGString
but when run from within an emml script it produces the following error: 306 ERROR [com.jackbe.jbp.jems.moe.runtime.commands.ScriptCommand] - <Error execution groovy script : com.jackbe.jbp.jems.moe.runtime.JEMSException: Variable not defined : mkp>
I'm not sure if this is a variable declaration issue or something to do with the MarkupBuilder helper class mkp not being accessible for this execution of a groovy script.
Hi Mashers,
Does anyone know what the rules are around declaration of variables in an enclosing emml script are for Groovy code execution?
The following Groovy code executes fine in the Groovy Console (1.6.5):
import groovy.xml.* def writer = new StringWriter() def bldr = new groovy.xml.MarkupBuilder(writer) bldr.text() {mkp.yieldUnescaped '<'+'![CDATA[some text]]'+'>'} String xmlStringHolder = writer
byte[] xmlBytes = xmlStringHolder.getBytes("UTF8")
xmlGString = new String(xmlBytes,"UTF8")
println xmlGString
but when run from within an emml script it produces the following error:
306 ERROR [com.jackbe.jbp.jems.moe.runtime.commands.ScriptCommand] - <Error execution groovy script : com.jackbe.jbp.jems.moe.runtime.JEMSException: Variable not defined : mkp>
I'm not sure if this is a variable declaration issue or something to do with the MarkupBuilder helper class mkp not being accessible for this execution of a groovy script.
Any ideas?
Cheers, Innes