Page 1 of 1

Ability to Quickly Insert Previewed Link Text in DITA Topic

Posted: Thu May 12, 2022 2:53 am
by dreifsnider
Oxygen XML Editor/Author already previews a link's text when in Author mode. However, I often find myself want to quickly edit the previewed link text. To do this, I'd like to ability to quickly insert the previewed link text directly into the link text so that I can edit it, instead of having to either copy and pasting the reference's title into the link text, or type out the entire link text.

I see this option living under the Link context menu.

Thank you!

Daniel

Re: Ability to Quickly Insert Previewed Link Text in DITA Topic

Posted: Thu May 12, 2022 7:50 am
by Radu
Hi Daniel,

Thanks for the idea, I added an internal issue to consider it:

EXM-50510 Action to bring target text to empty link contents

Maybe name the action something like "Insert referenced target link text"? I think this could also be implemented as a third party customization with a custom Author operation implemented in Java and added to the DITA framework if you are interested in customizing the DITA editing framework yourself.

Regards,
Radu

Re: Ability to Quickly Insert Previewed Link Text in DITA Topic

Posted: Thu May 12, 2022 12:19 pm
by chrispitude
Daniel, thank you for posting this feature request!

It would also be very useful for cross-book links into peer maps, in which the target text must be populated for it to render during publishing.

This is a tricky aspect of cross-book links. Oxygen resolves and shows the target text in the editor, without any indication that the link will be blank in publishing. Even Validate and Check for Completeness does not catch this. A DITA-OT transformation notices:

Code: Select all

[DOTJ047I] Unable to find key definition for key reference "bookB.bookB_topic3" in root scope. The href attribute may be used as fallback if it exists
[DOTJ047I] Unable to find key definition for key reference "bookB.bookB_topic4" in root scope. The href attribute may be used as fallback if it exists
but the user must (1) notice the messages, (2) understand the importance of them, and (3) realize how to fix them. (And they are reported as information, not even as warnings or errors!!)

We tried adding a Schematron check for empty link elements with periods in the keyref, but that also incorrectly flags local-but-scoped key references that have periods in the keyref. So this has been a somewhat problematic area for us.

Thinking out loud, perhaps Oxygen could flag empty peer map links in the editor and guide users to use Daniel's requested feature to insert the link text. (Or if there is a way to differentiate peer map references from local-but-scoped references in Schematron so that I can provide the guidance, I would like to know about it!)

Testcase for blank peer map links:

oxygen_blank_peer_references.zip

Re: Ability to Quickly Insert Previewed Link Text in DITA Topic

Posted: Thu May 12, 2022 12:42 pm
by Radu
Hi Chris,

Makes sense, I added a new internal issue based on your request:

EXM-50518 Show validation warnings when we have empty links to topics in peer publications

I would see this as a message with severity warning, something like "Links to peer topics need to have an explicit link text set."

Regards,
Radu

Re: Ability to Quickly Insert Previewed Link Text in DITA Topic

Posted: Thu May 12, 2022 12:45 pm
by chrispitude
Thanks Radu!

Would you see this as a Validate and Check for Completeness check, an in-editor validation check, or both? Both would be nice. :)

Re: Ability to Quickly Insert Previewed Link Text in DITA Topic

Posted: Thu May 12, 2022 12:47 pm
by Radu
Hi Chris,

I think both would be useful.

Regards,
Radu

Re: Ability to Quickly Insert Previewed Link Text in DITA Topic

Posted: Sun Jun 26, 2022 3:06 pm
by chrispitude
Could EXM-50510 and EXM-50518 be considered for Oxygen v25?

Enhancements to inserting/validating target text for references into peer maps would be quite useful!

Re: Ability to Quickly Insert Previewed Link Text in DITA Topic

Posted: Mon Jun 27, 2022 6:28 am
by Radu
Hi Chris,

They are not high priority for us. Maybe I will have time to work on the validation side (EXM-50518) to at least report such cases.

Regards,
Radu

Re: Ability to Quickly Insert Previewed Link Text in DITA Topic

Posted: Fri Mar 17, 2023 9:25 am
by Radu
Hi,
As an update, on the validation side we added some Java API which can be called from a Schematron schema to know more about a keyref's target:
https://www.oxygenxml.com/InstData/Edit ... nUtil.html
Regards,
Radu