XProc 3.0 transformation

Having trouble installing Oxygen? Got a bug to report? Post it all here.
daliboris
Posts: 26
Joined: Thu Feb 11, 2010 5:00 pm

XProc 3.0 transformation

Post by daliboris »

Hello,

I'm trying to create a custom framework for XProc 3.0 before the official one will be available.

I'm using oXygen 23 and Morgana XProc IIIse on Windows 10.

I have a problem with transformation. I set custom XProc Engine this way up:
Name: MorganaXProc-IIIse
Working Directory: D:\Programy\XML\Morgana
Command line: D:\Programy\XML\Morgana\Morgana.bat ${xproc}

Later in my Framework, I use these settings for my default Transformation scenario:
XProc URL: ${currentFileURL}
Processor: MorganaXProc-IIIse

Unfortunately, each time I run the XProc transformation scenario, it ends with an "Access denied." error:

System ID: D:\Data\Dropbox\RIDICS\Prace\2020\BiblOl\XProc\Directory-processing.xpl
Scenario: XProc 3.0 (Saxon 10)
XProc file: D:\Data\Dropbox\RIDICS\Prace\2020\BiblOl\XProc\Directory-processing.xpl
Document type: XProc 3.0
Engine name: MorganaXProc-IIIse
Severity: warning
Description: Access denied

What am I doing wrong? Is there any way to run XProc 3.0 transformation from oXygen's IDE?

Thank you for your support.
Mircea
Posts: 130
Joined: Tue Mar 25, 2003 11:21 am

Re: XProc 3.0 transformation

Post by Mircea »

Hello,

It seems that the place where you are writing the result is not allowing it.
Please check the writing rights on the result paths.

Regards,
Mircea.
Mircea Enachescu
<oXygen> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
daliboris
Posts: 26
Joined: Thu Feb 11, 2010 5:00 pm

Re: XProc 3.0 transformation

Post by daliboris »

Hi Mircea,

of course I checked it.

I'm calling the same Morgana's BAT file from Windows' CMD (without administrator privileges) and it works OK.

Maybe there are some other parameters within settings in oXygen where I left some values, which generates non existing path (which is then denied).

Can I check what exactly is oXygen calling/produced when I hit transformation scenarion button? Information window is not usefull in this case:

Code: Select all

[ 17:54:33] - XPROC Transformation 'XProc 3.0' started
[ 17:54:33] - XPROC Transformation 'XProc 3.0' ended in 0.0 seconds
Best,

Boris
Mircea
Posts: 130
Joined: Tue Mar 25, 2003 11:21 am

Re: XProc 3.0 transformation

Post by Mircea »

Hi Boris,

Unfortunatelly we cannot reproduce the problem. We do not have an adaptor that works with Morgana 3.
Do you have an Morgana XProc 3.0 adaptor for Oxygen ? Can you point us to it so we can give it a try ?
Most probably the problem is from the adaptor, since we only provide an API to be implemented by the connector.

Regarding to other XProc 3.0 processor, we do not have one right now, since we provide suport only for Calabash. As soon as Calabash will add suport for it, we will also have it.

Regards,
Mircea.
Mircea Enachescu
<oXygen> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
daliboris
Posts: 26
Joined: Thu Feb 11, 2010 5:00 pm

Re: XProc 3.0 transformation

Post by daliboris »

Thank you, Mircea.

That's the point. Morgana XProc 3.0 has no adaptor yet. I was just trying to run bat command with some parameters.

Which transformation scenario can I use to do this? My guess is ANT. Am I right?

Regards,

Boris
Mircea
Posts: 130
Joined: Tue Mar 25, 2003 11:21 am

Re: XProc 3.0 transformation

Post by Mircea »

Hello Boris,

You can either configure Morgana as an external tool (from Tools/External Tools, and pass the ${cf} argument which provides the path of the current selected file), or if you create a proper Ant Build file, you can create an Ant Transformation Scenario.

Regards,
Mircea.
Mircea Enachescu
<oXygen> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
daliboris
Posts: 26
Joined: Thu Feb 11, 2010 5:00 pm

Re: XProc 3.0 transformation

Post by daliboris »

Hello Mircea,

thank you for your suggestions.

I tried set up an ANT transformation scenario.

Unfortunately I have problems to run it from oXygen IDE.

ANT build.xml file is part of my XProc 3.0 framework. It looks like this

Code: Select all

<project basedir="." name="xproc" default="run">
  <target name="run">
      <echo>Running: ${xpf}</echo>
  <exec executable="cmd.exe">
    <arg value="/c"/>
    <arg value="D:\Programy\XML\Morgana\Morgana.bat"/>
    <arg value="${xpf}"/>
    <arg value="-xslt-connector=saxon10"/>
  </exec>
</target>
</project>
$xpf is an input variable: path to the XProc 3.0 file.

When I run it from oXygen, results looks like this

Code: Select all

Executing:
"c:\program files\oxygen xml editor\23\jre/bin/java" -Dfile.encoding=UTF-8 -Xmx512m -Djava.awt.headless=true -classpath "C:\Program Files\Oxygen XML Editor\23\tools\ant/lib/ant-launcher.jar" "-Dant.home=C:\Program Files\Oxygen XML Editor\23\tools\ant" org.apache.tools.ant.launch.Launcher -f "D:/Data/Dropbox/Nastaveni/oXygen/Frameworks/xproc/ant/build.xml" "-Dxpf=D:\Data\Dropbox\RIDICS\Prace\2020\BiblOl\XProc\Directory-processing.xpl" "-Dwebhelp.trial.license=no"

Buildfile: D:\Data\Dropbox\Nastaveni\oXygen\Frameworks\xproc\ant\build.xml

run:
     [echo] Running: D:\Data\Dropbox\RIDICS\Prace\2020\BiblOl\XProc\Directory-processing.xpl
     [exec] [quasar] ERROR: java/lang/Object
     [exec] java.lang.IllegalArgumentException
     [exec] 	at co.paralleluniverse.asm.ClassReader.<init>(Unknown Source)
     [exec] 	at co.paralleluniverse.asm.ClassReader.<init>(Unknown Source)
    .......
     [exec] 	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
     [exec] 	at com.xml_project.morganaxproc3.XProcEngine.<clinit>(Unknown Source)

The process finished with exit code: 1
When I run the same command from command line the result is successful:

Code: Select all

D:\Programy>"c:\program files\oxygen xml editor\23\jre/bin/java" -Dfile.encoding=UTF-8 -Xmx512m -Djava.awt.headless=true -classpath "C:\Program Files\Oxygen XML Editor\23\tools\ant/lib/ant-launcher.jar" "-Dant.home=C:\Program Files\Oxygen XML Editor\23\tools\ant" org.apache.tools.ant.launch.Launcher -f "D:/Data/Dropbox/Nastaveni/oXygen/Frameworks/xproc/ant/build.xml" "-Dxpf=D:\Data\Dropbox\RIDICS\Prace\2020\BiblOl\XProc\Directory-processing.xpl" "-Dwebhelp.trial.license=no"
Buildfile: D:\Data\Dropbox\Nastaveni\oXygen\Frameworks\xproc\ant\build.xml

run:
     [echo] Running: D:\Data\Dropbox\RIDICS\Prace\2020\BiblOl\XProc\Directory-processing.xpl
     [exec] =================================
     [exec] MorganaXProc-IIIse 0.9.5.5-beta
     [exec] Copyright 2011-2021 by <xml-project /> Achim Berndzen
     [exec] =================================
     [exec]
     [exec] [16:15:16.349] Group editions
     ....
     BUILD SUCCESSFUL
Total time: 6 seconds
What am I doing wrong? Where can be differences between running ANT from the oXygen IDE and from the Windows command line?

Regards,

Boris
Mircea
Posts: 130
Joined: Tue Mar 25, 2003 11:21 am

Re: XProc 3.0 transformation

Post by Mircea »

Hello Boris,

We tested an XProc transformation using the build file you provided with a local Morgana copy.
We cannot reproduce the problem you encountered.
This means that we need more complex testing environment from you, i.e. a sample XProc file.
Please send it on our email address: support [at] oxygenxml.com

Regards,
Mircea.
Mircea Enachescu
<oXygen> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
daliboris
Posts: 26
Joined: Thu Feb 11, 2010 5:00 pm

Re: XProc 3.0 transformation

Post by daliboris »

Dear Mircea,

after some time I've returned to the problem with XProc 3.0 transformation via ANT and Morgana.

I have 2 computers. On the first one the solution presented earlier in this thread works fine.

On the second one there is still problem with Java error:

Code: Select all

     [exec] [quasar] ERROR: java/lang/Object
     [exec] java.lang.IllegalArgumentException
     [exec] 	at co.paralleluniverse.asm.ClassReader.<init>(Unknown Source)
After some googling and diagnosting I think I've found reasons of this problem: Java version.

On the first computer (XML Editor 23.0, build 2020111805) I received this result:

Code: Select all

c:\Program Files\Oxygen XML Editor\23\jre\bin>java -version
java version "1.8.0_202"
Java(TM) SE Runtime Environment (build 1.8.0_202-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)
On the second laptop (XML Editor 23.1, build 2021061407) this one:

Code: Select all

C:\Program Files\Oxygen XML Editor\23\jre\bin>java -version
openjdk version "15.0.1" 2020-10-20
OpenJDK Runtime Environment (build 15.0.1+9-18)
OpenJDK 64-Bit Server VM (build 15.0.1+9-18, mixed mode)
It looks that Quasar library has problems with JDK higher than 8: https://github.com/puniverse/quasar/issues/253

Is this reason why I can't run XProc steps from oXygen using transformation scenario? If yes, how can I set desired Java version within C:\Program Files\Oxygen XML Editor\23\jre\bin\ folder - like on my first computer? By installing previous version of the XML Editor? Or is there another solution of this problem?

Regards.

Boris
Mircea
Posts: 130
Joined: Tue Mar 25, 2003 11:21 am

Re: XProc 3.0 transformation

Post by Mircea »

Hello Boris,

Please consider downloading the 23.1 installation kit that includes the Java SE 8u202.
https://www.oxygenxml.com/xml_editor/do ... ditor.html

Regards,
Mircea.
Mircea Enachescu
<oXygen> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply