problem with editor variables in scenario

Issues related to W3C XQuery.
SteffenWeitsch
Posts: 5

problem with editor variables in scenario

Fri Oct 13, 2017 6:13 pm

Hello,

in OxygenXML version 19.0 I configured a xquery transformation scenario with parameter $document. Its value is marked as "Evaluate as XPath" and value is doc('${currentFileURL}')/*

When I update my OxygenXML to version 19.1 I get with same scenario an error message.

Engine name: Saxon-EE XQuery 9.7.0.19
Severity: fatal
Description: Cannot evaluate the XPath expression 'doc('${currentFileURL}')/*' for parameter 'document'. Reason: FODC0002: I/O error reported by XML parser processing file:/C:/Users/xxx/Documents/xxx/${currentFileURL}: C:\Users\xxx\Documents\xxx\${currentFileURL} (Das System kann die angegebene Datei nicht finden)
Start location: 1:5
URL: http://www.w3.org/TR/2005/WD-xpath-func ... RRFODC0002

Regards
Steffen
Radu
Posts: 5088

Re: problem with editor variables in scenario

Mon Oct 16, 2017 10:57 am

Hi Steffen,

The "${currentFileURL}" gets expanded to the current opened and selected document in the main editor area.
So this would work if the current opened document in Oxygen is the XML document and you run the XQuery transformation scenario. I tried this on my side and it worked for me.
It would not work if you are running the scenario without any document opened in Oxygen.

If this still does not work for you, could you email us (support@oxygenxml.com), include a sample XML, XQuery and an export of the transformation scenario? The "Configure Transformation Scenario" dialog allows you to double click scenarios and export them.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
SteffenWeitsch
Posts: 5

Re: problem with editor variables in scenario

Mon Oct 16, 2017 11:39 am

Hello,

I tried your suggestion but this is not working, so I wrote mail to support.


Regards
Steffen
Radu
Posts: 5088

Re: problem with editor variables in scenario

Mon Oct 16, 2017 4:04 pm

Hi Steffen,

Thanks for sending us the samples. I added an internal issue to look into this and we'll update this forum thread when we have a fix for it.
Indeed the behavior may be caused by a change we made in Oxygen 19.1.
As a possible workaround which works also with any older Oxygen version, if you edit your transformation scenario, right now in the XML URL: value field right now you have no value set. Maybe you could set in it ${currentFileURL}. This should get Oxygen 19.1 to properly expand your parameter value.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
SteffenWeitsch
Posts: 5

Re: problem with editor variables in scenario

Mon Oct 16, 2017 4:19 pm

Hello,

I tried your suggestion and this is working. I tried it with 19.1 as well as 19.0 and both versions are working.

Regards
Steffen
Radu
Posts: 5088

Re: problem with editor variables in scenario

Mon Nov 13, 2017 11:54 am

Hi,

To update this thread, the latest Oxygen 19.1 kit we updated on our web site should fix the initial reported problem.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “XQuery”

Who is online

Users browsing this forum: No registered users and 0 guests