Using editorVariables in CSS

Post here questions and problems related to oXygen frameworks/document types.
Johann
Posts: 59

Using editorVariables in CSS

Wed Feb 22, 2017 1:42 pm

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

Re: Using editorVariables in CSS

Wed Feb 22, 2017 3:20 pm

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
sorin_carbunaru
Site Admin
Posts: 111

Re: Using editorVariables in CSS

Fri Apr 07, 2017 12:30 pm

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

Return to “SDK-API, Frameworks - Document Types”

Who is online

Users browsing this forum: No registered users and 0 guests