Can I use Oxygen variables with custom refactoring descriptor file?

<oXygen/> general issues.
dnl
Posts: 7

Can I use Oxygen variables with custom refactoring descriptor file?

Tue Aug 28, 2018 6:08 pm

https://www.oxygenxml.com/doc/versions/ ... iptor.html

I want to make the path of the current XML file available to the XQuery update script in my custom refactoring operation.

Is it possible to pass ${cfdu} in the descriptor file?
Radu
Posts: 6050

Re: Can I use Oxygen variables with custom refactoring descriptor file?

Wed Aug 29, 2018 8:02 am

Hi,

Right now it is not possible to pass an Oxygen editor variable as a parameter value to the script and have the editor variable automatically expand before being sent to the script, we do have plans for this and I will update this forum thread when this feature becomes available.
About your particular request, why don't you use the "document-uri()" XQuery function for it?

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

Re: Can I use Oxygen variables with custom refactoring descriptor file?

Wed Aug 29, 2018 9:48 am

Thanks, this would be a great enhancement.

As a workaround I will use document-uri(), but I wanted to avoid having to use function chaining like replace(document-uri(),tokenize(document-uri(),'/')[last()],'') (is there a simpler way for saying "give me the path of the current file"?)

Thanks!
Radu
Posts: 6050

Re: Can I use Oxygen variables with custom refactoring descriptor file?

Wed Aug 29, 2018 9:55 am

Hi,

Right, maybe for now you can create a separate XQuery function to obtain the parent folder URL for the current file and then import and use that function in multiple XQuery scripts.

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

Re: Can I use Oxygen variables with custom refactoring descriptor file?

Fri Dec 28, 2018 3:50 pm

More thanks for the info, it helped me

Return to “Other Issues”

Who is online

Users browsing this forum: No registered users and 2 guests