Book validation follows cross-book @conref into target book content
Posted: Fri Dec 04, 2020 11:08 pm
Hi all,
Each of our books has its own key scope. We create crossbook links using scoped keyrefs, and we reuse content across books using scoped conkeyrefs.
However, I noticed something interesting. If a writer accidentally uses a cross-book @conref to reuse a single element from another book topic file:
then "Validate and check for completeness" in the current book issues missing-key errors for any key references in any content in the @conref'ed file, whether it was used or unused by the @conref. But if we use a @conkeyref instead:
then book validation doesn't complain.
Is this expected behavior? I can educate my writers to use @conkeyref for cross-book links, but I figured I'd ask here if the @conref behavior is expected or a bug. You can reproduce the behavior in the attached testcase as follows:
1. Open the OPENME1.xpr project file.
2. Open the OPENME2.ditamap map file.
3. Run "Validate and check for completeness" and note the missing keys for topic1 and topic3 from topic2.dita (the @conref target).
4. If you comment out the <p @conref> element in topic.dita, the validation errors go away.
Each of our books has its own key scope. We create crossbook links using scoped keyrefs, and we reuse content across books using scoped conkeyrefs.
However, I noticed something interesting. If a writer accidentally uses a cross-book @conref to reuse a single element from another book topic file:
Code: Select all
<p conref="peer_topic_2.dita#peer_topic_2/reuse_me"/>
Code: Select all
<p conkeyref="peer_map.peer_topic_2/reuse_me"/>
Is this expected behavior? I can educate my writers to use @conkeyref for cross-book links, but I figured I'd ask here if the @conref behavior is expected or a bug. You can reproduce the behavior in the attached testcase as follows:
1. Open the OPENME1.xpr project file.
2. Open the OPENME2.ditamap map file.
3. Run "Validate and check for completeness" and note the missing keys for topic1 and topic3 from topic2.dita (the @conref target).
4. If you comment out the <p @conref> element in topic.dita, the validation errors go away.