Issue conref and oxy_xpath() with descendant-axis causes an error in authorMode CSS

Post here questions and problems related to editing and publishing DITA content.
yokota
Posts: 7
Joined: Wed Mar 13, 2024 4:22 am

Issue conref and oxy_xpath() with descendant-axis causes an error in authorMode CSS

Post by yokota »

DITA document using conref and applying customized CSS in AuthorMode ,
Oxygen logged an error as below;

```
[CSS]:XPath " if (./descendant::special => exists()) then ('TEXT') else ('')" failed: XPath failed due to: Cannot invoke "ro.sync.ecss.extensions.api.Content.getString(int, int)" because "this.f" is null
```
The CSS, oxy_xpath() contains descendant axis .

Code: Select all

elem::after {
content: oxy_xpath("\
       if (\
            ./descendant::special => exists()) \
        then (TEXT') else ('')",
         processChangeMarkers, true);
}
Result views of conref-or-not are expected (when exists descendant target elem, "TEXT" is appeared).
But error log is unexpected.
Could we avoid this error?

Because of :has() limitation ( writing `* > * > ...` is unmatch the case),
we have to oxy_xpath() and descendant-axis to detect the target.

Oxygen version is
<oXygen/> XML Author 27.1, build 2025041508

Regards,
Tatsuro YOKOTA
Antenna House, Inc.
http://www.antenna.co.jp/
http://www.antennahouse.com/
Radu
Posts: 9473
Joined: Fri Jul 09, 2004 5:18 pm

Re: Issue conref and oxy_xpath() with descendant-axis causes an error in authorMode CSS

Post by Radu »

Hi Tatsuro,

Could you send us via email (support@oxygenxml.com) a small sample DITA XML project with steps with the custom CSS in order to reproduce the problem on our side?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply