Customize link action

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

Customize link action

Wed Mar 23, 2016 10:11 am

we are using Eclipse Oxygen Author 17.1.

We are using a CMS for storing the documents. If the user want to edit a file, the file will be downloaded and when it's done the oxygen editor opens. If that document contains a xref, we usually do not download it. In this case the oxygen underline the xref in red and in the result view occurs a file not found message.

Where I can remove the underline and the file not found message in the result view?

If I click on the link anchor of the xref a dialog pop up and give me the opportunity to create a new file. I would remove the dialog and download the referenced file.
What I have to do to achieve this requirements?

Best regards
Denis Zygann
KGU Consulting GmbH
Posts: 5224

Re: Customize link action

Wed Mar 23, 2016 2:44 pm

Hi Denis,

To explain a little bit how this works, in one of the CSSs we use for DITA rendering there is a selector like:

Code: Select all

*[class~="topic/xref"][type][href]:empty {
    content: oxy_getSomeText(oxy_link-text(), 150, true);

The called oxy_getSomeText CSS extension function ends up calling a special DITA implementation called

So you have the following options:

1) In the Oxygen plugin.xml there is an extension point called ditaLinkTextResolverCustomizer which allows you to setup a custom Java class which would take care of computing the link text.

2) Overwrite that CSS selector I mentioned to avoid calling the oxy_link-text() function.
3) Use the code from DitaLinkTextResolver to create your own link text resolver.

I would recommend (1).

Radu Coravu
<oXygen/> XML Editor

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

Who is online

Users browsing this forum: No registered users and 1 guest