Page 1 of 1
Can I use Oxygen variables with custom refactoring descriptor file?
Posted: Tue Aug 28, 2018 6:08 pm
by dnl
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?
Re: Can I use Oxygen variables with custom refactoring descriptor file?
Posted: Wed Aug 29, 2018 8:02 am
by Radu
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
Re: Can I use Oxygen variables with custom refactoring descriptor file?
Posted: Wed Aug 29, 2018 9:48 am
by dnl
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!
Re: Can I use Oxygen variables with custom refactoring descriptor file?
Posted: Wed Aug 29, 2018 9:55 am
by Radu
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
Re: Can I use Oxygen variables with custom refactoring descriptor file?
Posted: Fri Dec 28, 2018 3:50 pm
by EmmeTi
More thanks for the info, it helped me