unresolved key reference message: Could not find definition for key "map" keys are provided by: ABC Root Map

Balaji_Raj02
Posts: 2

unresolved key reference message: Could not find definition for key "map" keys are provided by: ABC Root Map

Thu Jan 03, 2019 4:56 pm

Hi,

I am new to Oxygen,

From Oxygen XML Editor, when trying to open a bookmap containing maps & topics, am getting the following error on clicking topic or map reference.

"Unresolved key reference message: Could not find definition for key "map" keys are provided by: ABC Root Map"

Following block is executed during oxygen editor initialization, to load the map file metadata in to keydefinition info object.

ro.sync.exml.workspace.api.editor.page.ditamap.keys.KeyDefinitionInfo.setProperty(KeyDefinitionInfo.DEFINITION_LOCATION, "D:/Oxygen/sample.ditamap");

ro.sync.exml.workspace.api.editor.page.ditamap.keys.KeyDefinitionInfo.setProperty(KeyDefinitionInfo.HREF, "myMapFileName.dita"); (My Map file name refers to the Map which i am clicking from oxygen xml editor. My Map file & bookmap file is located in D:/Oxygen)

Oxygen JAR Version : 19.0.0.0

Kindly share your thoughts to resolve this issue.

Regards,
Balaji
sorin_carbunaru
Site Admin
Posts: 165

Re: unresolved key reference message: Could not find definition for key "map" keys are provided by: ABC Root Map

Fri Jan 04, 2019 12:52 pm

Hello Balaji,

You must also set the name of the key:

Code: Select all

keyDefInfo.setProperty(KeyDefinitionInfo.NAME, "map");


Regards,
Sorin Carbunaru
oXygen XML
Balaji_Raj02
Posts: 2

Re: unresolved key reference message: Could not find definition for key "map" keys are provided by: ABC Root Map

Fri Jan 11, 2019 6:03 pm

Thanks for your response Sorin Carbunaru.

As you said name property is set. Following are the properties used,

Code: Select all


String mapName = "Map Name"

keyDefinitionInfo.setProperty(KeyDefinitionInfo.NAME, mapName );

KeyDefinitionInfo.setProperty(KeyDefinitionInfo.DEFINITION_LOCATION, "D:/Oxygen/sample.ditamap");

KeyDefinitionInfo.setProperty(KeyDefinitionInfo.HREF, "myMapFileName.dita");

keyDefinitionInfo.setProperty(KeyDefinitionInfo.IS_SUBJECT_DEF, false);

keyDefinitionInfo.setProperty(KeyDefinitionInfo.META_CONTENT_PROVIDER, new MetaContentProvider() {
                @Override
                public String getContent(String s) {
                    return mapName ;
                }
            });

keyDefinitionInfo.setProperty(KeyDefinitionInfo.SUBJECT_DEF_CHILDREN, null);

sorin_carbunaru
Site Admin
Posts: 165

Re: unresolved key reference message: Could not find definition for key "map" keys are provided by: ABC Root Map

Fri Jan 11, 2019 6:35 pm

Hmmm... I saw you error complains about a key names "map", while the name you set is "Map Name". Do you have any other key defined, which has the "NAME" argument set to "map"? If not, you should do that.

If changing the name from "Map Name" to "map" is not the solution, I will need more information about what exactly you are trying to do and some more snippets of code, such as entire methods, especially the one that defines all the keys.

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 2 guests