could not find the definition of key

Oxygen general issues.
vishwavaranasi
Posts: 144
Joined: Fri Feb 28, 2020 4:02 pm

could not find the definition of key

Post by vishwavaranasi »

Hello team, the background is we were moving from Arbortext editor to Oxygen tool.

We have defined our conref and conkeyrefs in different ditamap lets say title_conrefs.ditamap where we have titles created.

and we have our ditamaps created to create a book , but when we open the our dita map lets say first_book.ditamap in oxygen , we have got the error "could not find the definition of key "key_name" Keys are gathered from root map "first_book.ditamap"

from DITA Maps Manager if i change the Root map to title_conrefs.ditamap then the keys definitions found and the error got fixed , here my question is how to automatically my ditamaps should find the keys (conkeyref or conref) .

once i close the oxygen editor then again i need to change the root map every time when i open the my ditamaps to find the keys.

would you please help us here?

Thanks,
vishwa
Thanks,
vishwa
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: could not find the definition of key

Post by Radu »

Hi Vishwa,

Your " first_book.ditamap" should have a topic reference to the "title_conrefs.ditamap", something like:

Code: Select all

<topicref href="title_conrefs.ditamap" format="ditamap"/>
Did you add such a reference to your top level DITA Map? The reference is important both for the publishing and for Oxygen to take the defined keys into account when opening files from the top level DITA Map.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
vishwavaranasi
Posts: 144
Joined: Fri Feb 28, 2020 4:02 pm

Re: could not find the definition of key

Post by vishwavaranasi »

Thanks Radu for the reply. here is the scenario

and when i open the my_first_book.ditamap - we see the error
"could not find the definition for key "title_conrefs" Keys are gathered from root map "my_first_book.ditamap"

my_first_book.ditamap
=======================
<bookmap id="bookmap_id">
<booktitle><booklibrary><ph conkeyref="title_conrefs/title_id"></booktitle>
<mapref format="ditamap" href="titles.ditamap" navtitle="On-Premise Product and Guide Names" processing-role="resource-only" scope="local"></mapref>
</bookmap>

titles.ditamap
================
<map id="map_id" xml:lang="en"><title>Titles</title><topicref format="dita" href="titles_topic.xml" keys="title_conrefs" navtitle="" processing-role="resource-only" scope="local" type="topic"></topicref>
</map>



titles_topic.xml
===================
<topic id="topic_id" xml:lang="en">
<title>titles</title>
<body>
<p><ph id="title_id">My First Book</ph></p>
</body>
</topic>
Thanks,
vishwa
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: could not find the definition of key

Post by Radu »

Hi,

Your examples have validation problems, for example the "my_first_book.ditamap" is missing various XML end tags plus the mapref element is not allowed as a direct child of the <bookmap> element. If you open such a DITA Map in Oxygen in the main editing area, it will present various validation errors.
How about if you send us via email (support@oxygenxml.com) a small sample project with valid files on which the problem can be reproduced?

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