Page 1 of 1

Using editorVariables in CSS

Posted: Wed Feb 22, 2017 1:42 pm
by Johann
Hi everyone,

I use the Oxygen component. In the CSS file, I want to access, with an oxy_xpath, data stored in a XML file located in the framework directory.

I can do this with an absolute path :

Code: Select all

element{
content: oxy_xpath('doc("file:/absolute_path/data.xml")//XPATH');
}


But I would like to use editorVariables like ${frameworksDir} to avoid the absolutePath :

Code: Select all

element{
content: oxy_xpath('doc(${frameworksDir})//XPATH');
}


How can I do it ?

Thank you,

Johann

Re: Using editorVariables in CSS

Posted: Wed Feb 22, 2017 3:20 pm
by Radu
Hi Johann,

In Oxygen 19 (April-May this year) the oxy_xpath will automatically expand editor variables in the expression.
Until then, the oxy_url CSS function expands such editor variables and you can use it to construct the URL on which the document function is called from the xpath expression, something like what's mentioned here:

https://www.oxygenxml.com/forum/post40812.html#p40900

Regards,
Radu

Re: Using editorVariables in CSS

Posted: Fri Apr 07, 2017 12:30 pm
by sorin_carbunaru
Hi,

Just wanted to let you know that oXygen 19.0 has been released two days ago and in this version the oxy_xpath() CSS function supports editor variables.

Best wishes,
Sorin Carbunaru
oXygen XML