"Display referenced content" generates error

Post here questions and problems related to editing and publishing DITA content.
MarcelM
Posts: 5
Joined: Mon Feb 04, 2019 5:59 pm

"Display referenced content" generates error

Post 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
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: "Display referenced content" generates error

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
MarcelM
Posts: 5
Joined: Mon Feb 04, 2019 5:59 pm

Re: "Display referenced content" generates error

Post 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
Attachments
Oxygen21.1.png
Oxygen21.1.png (116.34 KiB) Viewed 1786 times
Oxygen19.1.png
Oxygen19.1.png (109.54 KiB) Viewed 1786 times
MarcelM
Posts: 5
Joined: Mon Feb 04, 2019 5:59 pm

Re: "Display referenced content" generates error

Post 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 199 times
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: "Display referenced content" generates error

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: "Display referenced content" generates error

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: "Display referenced content" generates error

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply