Questions about validation of reused topics in different keyscopes

Post here questions and problems related to editing and publishing DITA content.
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Questions about validation of reused topics in different keyscopes

Post by chrispitude »

We have a large WebHelp map that contains multiple books. Each book has its own keyscope. Some content is reused within multiple books, which also means the content is reused in multiple keyscope contexts.

In the following example, "Book4 good" and "Book4 bad" both include a shared topic file:

image.png
image.png (18.83 KiB) Viewed 564 times

The shared topic file has a cross-book link to a "bookX" topic. "Book4 good" declares "bookX" as a peer map, and so the cross-book link is good. "Book 4bad" does not declare "bookX", and so the cross-book link is bad.

When I run Validate and Check for Completeness, I get:

image.png
image.png (9.44 KiB) Viewed 564 times

Some questions I have are:
  • Why do I get two validation failures for the same "Book 4bad" topic instance?
  • When I double-click the validation error, it opens the topic but the reference is not highlighted in the editing window as unresolved. Is this expected?
  • If I manually open the "Book 4bad" instance of the shared topic, still the reference is not shown as unresolved. For a multiple-instance topic, does Oxygen always display the topic with its first map-instance context applied?
On our production content, we have chapter submaps (with many topics) shared across multiple books. Because of this, (1) it is easy to accidentally include cross-references that work in some books but not others, and (2) the behaviors above can make the resulting validation issues difficult to debug.

Here's the testcase:

oxygen_validation_keyscopes.zip
(6.7 KiB) Downloaded 107 times
Radu
Posts: 8992
Joined: Fri Jul 09, 2004 5:18 pm

Re: Questions about validation of reused topics in different keyscopes

Post by Radu »

Hi Chris,

I do not think I can provide an immediate answer for this, I added an internal issue to look into this case:

EXM-52134 Investigate validate and check for completeness behaviors

Some hunches related to your questions:
Why do I get two validation failures for the same "Book 4bad" topic instance?
I think that when validating Oxygen reaches this topic through two different paths and considers the topic to somehow be reachable through different key scopes and thus parses it twice. If you right click an error in the "Errors" list and choose "Show message", Oxygen will show a "Reference stack" showing through which path it reached the topic. Sometimes this helps when debugging a problem. I suspect it's related to the fact that you define the "book4bad" keyscope both on the map reference and on the <map> element itself, so it looks like a bug on our side.
When I double-click the validation error, it opens the topic but the reference is not highlighted in the editing window as unresolved. Is this expected?
If I manually open the "Book 4bad" instance of the shared topic, still the reference is not shown as unresolved. For a multiple-instance topic, does Oxygen always display the topic with its first map-instance context applied?
The validation of a topic may not be done as accurately when it's validated on its own, so I think that when validating a single topic in certain cases we are more lenient and may resolve a keyref although we shouldn't, again, I will look into this.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 8992
Joined: Fri Jul 09, 2004 5:18 pm

Re: Questions about validation of reused topics in different keyscopes

Post by Radu »

Hi,
This problem should be fixed in Oxygen 25.1.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Questions about validation of reused topics in different keyscopes

Post by chrispitude »

Fantastic, thanks Radu!
Post Reply