Unresolved Keyref

Post here questions and problems related to oXygen frameworks/document types.
Posts: 6
Joined: Mon May 20, 2019 5:24 pm

Unresolved Keyref

Post by krishna » Thu Jun 06, 2019 11:09 pm


I have created a plugin for Oxygen XML Editor and in that, I have created a custom Author extension state listener class by overriding the activated and deactivated methods and tried to extend the DITA Map framework in the following way :

1) Go to Options > Preferences > Document Type Association and extend the DITA Map framework.
2) In this DITA Map Extension, Go to Classpath tab and load plugin using "Use parent classloader from plugin with ID : <my plugin ID>"
3) Go to Extensions tab and under Individual extensions click Choose for Author extension state listener and select the custom Author extension state listener class
4) Click OK on all open dialogs

Upon doing this, when I try to resolve the keyref in a DITA file by selecting a Root Map, the keyref is not getting resolved.
It displays a message saying that the particular keyref is not found in the Root Map.

However, when I remove this Custom Author extension state listener from the individual extensions, the keyref is getting resolved.

Can someone please let me know if I am missing anything in the Custom author extension state listener class?


Posts: 7266
Joined: Fri Jul 09, 2004 5:18 pm

Re: Unresolved Keyref

Post by Radu » Fri Jun 07, 2019 8:08 am

Hi Krishna,

By adding your own Author extension state listener you inhibited the default Author extension state listener used in the DITA Map framework Java extensions.

The workaround would be to extend directly the DITA Map extensions bundle (located in the dita.jar):

Code: Select all

public class DITAMapExtBundleExt extends ro.sync.ecss.extensions.dita.map.DITAMapExtensionsBundle {

   * @see ro.sync.ecss.extensions.dita.DITAExtensionsBundle#createAuthorExtensionStateListener()
  public AuthorExtensionStateListener createAuthorExtensionStateListener() {
    AuthorExtensionStateListener superListener = super.createAuthorExtensionStateListener();
    return new AuthorExtensionStateListener() {
      public String getDescription() {
        return "My extension state listener";
      public void deactivated(AuthorAccess authorAccess) {
        //Here you can call your own code
      public void activated(AuthorAccess authorAccess) {
        //Here you can call your own code
and then edit the framework configuration in the Oxygen Preferences->Document Type Associations page and in the "Extensions" tab set your own "Extensions Bundle" instance instead of setting the individual AuthorExtensionStateListener extension.

Radu Coravu
<oXygen/> XML Editor

Post Reply