We have a very weird situation with the latest release of the TEI plugin (which we've had to roll back as a result). Doing a transformation which builds an ODD file to RelaxNG, I get an error when we run the process inside Oxygen, but if I copy/paste the entire command line from the Oxygen output window into bash and run it there, I don't get the error. Below is what we're running, and the result from inside Oxygen; it's complaining about an internal Saxon error relating to variable binding, but we don't see that error when we run outside the Oxygen environment, which is very odd indeed. Can you shed any light on this?

BUILD FAILED
/home/mholmes/.com.oxygenxml/extensions/v18.1/frameworks/http___teijenkins.hcmc.uvic.ca_job_oxygen_tei_bleeding_lastSuccessfulBuild_artifact_oxygen_tei_updateSite.oxygen/tei/xml/tei/stylesheet/relaxng/build-to.xml:30: The following error occurred while executing this line:
/home/mholmes/.com.oxygenxml/extensions/v18.1/frameworks/http___teijenkins.hcmc.uvic.ca_job_oxygen_tei_bleeding_lastSuccessfulBuild_artifact_oxygen_tei_updateSite.oxygen/tei/xml/tei/stylesheet/common/teianttasks.xml:349: java.lang.IllegalStateException: *** Internal Saxon error: local variable encountered whose binding has been deleted
at net.sf.saxon.expr.parser.ExpressionTool.allocateSlots(ExpressionTool.java:597)
at net.sf.saxon.expr.parser.ExpressionTool.allocateSlots(ExpressionTool.java:606)
at net.sf.saxon.expr.parser.ExpressionTool.allocateSlots(ExpressionTool.java:606)
at net.sf.saxon.expr.parser.ExpressionTool.allocateSlots(ExpressionTool.java:606)
at net.sf.saxon.expr.parser.ExpressionTool.allocateSlots(ExpressionTool.java:606)
at net.sf.saxon.expr.parser.ExpressionTool.allocateSlots(ExpressionTool.java:606)
at net.sf.saxon.expr.parser.ExpressionTool.allocateSlots(ExpressionTool.java:606)
at net.sf.saxon.expr.parser.ExpressionTool.allocateSlots(ExpressionTool.java:606)
at net.sf.saxon.expr.parser.ExpressionTool.allocateSlots(ExpressionTool.java:606)
at net.sf.saxon.expr.parser.ExpressionTool.allocateSlots(ExpressionTool.java:606)
at net.sf.saxon.expr.parser.ExpressionTool.allocateSlots(ExpressionTool.java:606)
at net.sf.saxon.expr.parser.ExpressionTool.allocateSlots(ExpressionTool.java:606)
at net.sf.saxon.expr.parser.ExpressionTool.allocateSlots(ExpressionTool.java:606)
at net.sf.saxon.expr.parser.ExpressionTool.allocateSlots(ExpressionTool.java:606)
at net.sf.saxon.expr.parser.ExpressionTool.allocateSlots(ExpressionTool.java:606)
at net.sf.saxon.expr.parser.ExpressionTool.allocateSlots(ExpressionTool.java:606)
at net.sf.saxon.expr.parser.ExpressionTool.allocateSlots(ExpressionTool.java:606)
at net.sf.saxon.expr.parser.ExpressionTool.allocateSlots(ExpressionTool.java:606)
at net.sf.saxon.expr.parser.ExpressionTool.allocateSlots(ExpressionTool.java:606)
at net.sf.saxon.expr.parser.ExpressionTool.allocateSlots(ExpressionTool.java:606)
at net.sf.saxon.style.StyleElement.allocateSlots(Unknown Source)
at net.sf.saxon.style.XSLTemplate.optimize(XSLTemplate.java:632)
at net.sf.saxon.style.StylesheetPackage.optimizeTopLevel(Unknown Source)
at net.sf.saxon.style.StylesheetPackage.compile(Unknown Source)
at net.sf.saxon.style.Compilation.compilePackage(Compilation.java:201)
at net.sf.saxon.style.Compilation.compileSingletonPackage(Compilation.java:94)
at net.sf.saxon.s9api.XsltCompiler.compile(XsltCompiler.java:543)
at net.sf.saxon.jaxp.SaxonTransformerFactory.newTemplates(Unknown Source)
at org.apache.tools.ant.taskdefs.optional.TraXLiaison.readTemplates(TraXLiaison.java:300)
at org.apache.tools.ant.taskdefs.optional.TraXLiaison.createTransformer(TraXLiaison.java:317)
at org.apache.tools.ant.taskdefs.optional.TraXLiaison.transform(TraXLiaison.java:178)
at org.apache.tools.ant.taskdefs.XSLTProcess.process(XSLTProcess.java:876)
at org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:414)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:396)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

but I still can't see how it only happens when running from within Oxygen, not when running exactly the same command in bash directly. I've tried updating the Saxon in Oxygen to 9.7 using the add-on method, but it makes no difference; the fix for Saxon may not have made its way into the Oxygen add-on 9.7 yet, though.

but I still can't see how it only happens when running from within Oxygen, not when running exactly the same command in bash directly

Are you using exactly the same command, copied from the console inside Oxygen? I'm curious if the -lib parameters are the same, more specifically is oxygen.jar is there. Anyway, in the Saxon issue it says that the Java version is also important:

We have now established that this fails running in the IDE under JDK 1.6, though it succeeds under JDK 1.8.

so perhaps different JVMs are used from Oxygen and from the command line.

the fix for Saxon may not have made its way into the Oxygen add-on 9.7 yet, though.

The "ODD file to RelaxNG" transformation is an ANT transformation so the 9.7 add-on has no effect on it (the transformation's configuration passed the built-in Saxon jar). Besides that, the fix done by Michael Key wasn't released yet (the flag "Fixed in Maintenance Release" is not set).

Can you send me a sample ODD file on support@oxygenxml.com for me to reproduce the issue? I tried with a trivial ODD but I didn't managed to reproduce it.

I managed to reproduce the issue with by using oxygen-tei-6.1.0 and I also see the different behavior between running the transformation in Oxygen and running it from the command line. I'll investigate some more. As a side note, I see that using Saxon 9.7 will make the transformation succeed.

When running the transformation from within Oxygen, Saxon will be licensed and because of that it will apply a number of optimizations. This is why is failing. When running the same command line outside Oxygen, Saxon will not be license (the Home Edition will be used) and so the optimizations will not be activated.

As a solution, I suggest making the "ODD file to RelaxNG" run with Saxon HE. To do that you'll have to edit the scenario, click "Libraries" and remove the entry ${oxygenHome}/lib/oxygen.jar .
Alex