Potential performance concerns with oxy_url() and oxy_xpath() ?

Posts: 1

Potential performance concerns with oxy_url() and oxy_xpath() ?

Thu Dec 21, 2017 1:30 am


I notice that if the CSS custom funtions like oxy_url() and oxy_xpath() are used for resolving links in DocBook5, something like:

Code: Select all

content:oxy_xpath(oxy_concat('doc("', oxy_url('${pdu}/', 'a.xml'), '")//@val')) !important;

it works, but apparently when it is turned on Oxygen would work noticeably slower. E.g. if I open a Docbook5 XML that contains many links, then turn on the link resolution, Oxygen can usually become unresponsive for even a few minutes.

Is it a known issue that oxy_url() and oxy_xpath() might take a bit long to process? If that’s the case, with Oxygen XML Editor 19, do we have the option of creating our own CSS custom functions to use in a framework, or do we need to create a whole new plugin to make link resolution faster?

Any suggestions are much appreciated.
Posts: 5221

Re: Potential performance concerns with oxy_url() and oxy_xpath() ?

Thu Dec 21, 2017 12:51 pm


Indeed you should avoid using oxy_xpath or at least change the value of the "evaluate" parameter:


to avoid evaluating the XPath very often like:

Code: Select all

content:oxy_xpath(oxy_concat('doc("', oxy_url('${pdu}/', 'a.xml'), '")//@val'), evaluate, static) !important;

To avoid oxy_xpath completely we have a CSS extension function called oxy_link-text():


this function will call a Java-based API extension of an interface in our Author SDK, you can search for "LinkTextResolver" here:


Our Author SDK which can be used to compile Java extensions can be found here:


Radu Coravu
<oXygen/> XML Editor

Return to “DocBook”

Who is online

Users browsing this forum: No registered users and 1 guest