Using editorVariables in CSS

Post here questions and problems related to oXygen frameworks/document types.
Johann
Posts: 198
Joined: Wed Jun 17, 2015 12:46 pm

Using editorVariables in CSS

Post 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
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: Using editorVariables in CSS

Post 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:

post40812.html#p40900

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
sorin_carbunaru
Posts: 402
Joined: Mon May 09, 2016 9:37 am

Re: Using editorVariables in CSS

Post 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
Post Reply