context.setCompileFunctionsWithDynamicScope(true);
context.setGeneratingDebug(true);
// add support for Rhino objects to JXPath
JXPathIntrospector.registerDynamicClass(org.mozilla.javascript.Scriptable.class,
ScriptablePropertyHandler.class);
JXPathContextReferenceImpl.addNodePointerFactory(new ScriptablePointerFactory());
try {
scope = new Global(context);
// Access to Cocoon internal objects
AO_FOM_Cocoon.init(scope);