Page 1 of 1

"Display referenced content" generates error

Posted: Tue Aug 27, 2019 4:45 pm
by MarcelM
Hi,

I switched from Oxygen 19.1 to 21.1.
Now within autor mode all conkeyrefs are no more resolved.
There is an error message displayed for all conkeyrefs (example below):
Element ID 'Produktname' not found in topic with ID 'Inhalt'

The project worked fine in Oxygen 19.1
Is there a new setting within 21.1 ?

Marcel

Re: "Display referenced content" generates error

Posted: Wed Aug 28, 2019 8:29 am
by Radu
Hi Marcel,

In the "DITA Maps Manager" view there is a "Root Map" combo box. Please make sure that it point to the proper DITA Map which has those keys defined (or which references submaps with those keys defined).

Regards,
Radu

Re: "Display referenced content" generates error

Posted: Wed Aug 28, 2019 10:28 am
by MarcelM
Hi Radu,

the root map is correctly selected.
I opened the same project in 19.1 and 21.1, did the same selections of root map and settings.
Version 19.1 displays all conkeyrefs correctly.
Version 21.1 shows errors.

Please see results of both versions in attachments:

Marcel

Image
Image

Re: "Display referenced content" generates error

Posted: Wed Aug 28, 2019 11:39 am
by MarcelM
Hi Radu,

I have found the problem: The topic with the referenced elements contains a topic within a topic:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="Inhalt">
<title>Namen A</title>
<topic id="nnn">
<title/>
<body>
<p>
<text id="textOS">Windows</text>
<text id="textName1">Name A eins</text>
</p>
</body>
</topic>
</topic>

The author view of Oxygen 21.1 does not find these ids.
If I use the text view the intellisense offers the ids within the dropdown list.
Also the "insert cross refenrence dialog" will find the ids and the conkeyref can be inserted.
The Dita-Toolkit can resolve these ids.

I think this is an issue of Oxygen 21.1.

Marcel

I added a test project.
Oxygen Testprojekt.zip
(5 KiB) Downloaded 21 times

Re: "Display referenced content" generates error

Posted: Thu Aug 29, 2019 9:48 am
by Radu
Hi Marcel,

Indeed sometime before Oxygen 20.1 was released we added this change in the way we resolve key references.
The change was made in order to adhere more to the DITA specification as the publishing engine has itself problems interpreting such links to inner topics when using keyrefs, see the issue I added here:

https://github.com/dita-ot/dita-ot/issues/2905

From the DITA standard point of view there are two topics inside your "topic.dita", and if you define the key to point to the "topic.dita" then you can only refer to element IDs from inside the main topic and not from the inner topic.
For example in your case, if in the DITA Map you define the key something like this:

Code: Select all

<keydef keys="key" href="topic.dita"/>
then it's similar to defining it like this:

Code: Select all

<keydef keys="key" href="topic.dita#Inhalt"/>
then a keyref can only refer to element IDs from inside the topic with ID "Inhalt" but not from topics engulfed inside the main topic.

But you can do this:

Code: Select all

<keydef keys="keyInner" href="topic.dita#nnn"/>
and then you will be able to use your "keyInner" to refer to element IDs inside the inner topic with the id="nnn", so something like "keyInner/textOS" will be properly resolved.

Regards,
Radu

Re: "Display referenced content" generates error

Posted: Thu Aug 29, 2019 9:50 am
by Radu
About these remarks:
If I use the text view the intellisense offers the ids within the dropdown list.
Also the "insert cross refenrence dialog" will find the ids and the conkeyref can be inserted.
We have internal issues to also add this restriction in the places you mentioned above but we have not yet implemented them.

Regards,
Radu

Re: "Display referenced content" generates error

Posted: Wed Feb 19, 2020 9:12 am
by Radu
Hi,

As an update, in Oxygen version 22 we avoid showing as possible targets ID attributes from inner topics which cannot be reached according to the DITA specification.

Regards,
Radu