Re: Keyref/conkey ref conversion strategy - keyref all the things? #conref


Radu Coravu
 

Hi Ed,

I don't understand, do you want to convert indirect links (keyrefs) to content references (conkeyrefs)?
Can you give maybe an example with how the DITA content would look like before and after the conversion? And maybe explain why you want that?

Or do you actually want to convert direct links (using href) to indirect links (using keyrefs)?
For the latter I would use a custom XML refactoring XSLT script run with Oxygen XML Editor to change all hrefs to keyrefs:

https://www.oxygenxml.com/doc/versions/21.1/ug-editor/topics/custom_operation_sample-x-tools.html

As an example an XSLT script which changes topicref hrefs with keyrefs:

https://github.com/oxygenxml/dita-refactoring-examples/tree/master/30%20Topicref%20Href%20to%20Keyrefs

I also did something similar (image hrefs to keyrefs) with a custom ANT build file:

https://github.com/oxygenxml/dita-refactoring-examples/tree/master/6.%20Image%20Href%20to%20Keyref

Regards,
Radu

Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

On 1/22/2020 9:53 PM, Marsh, Ed wrote:
Hi all,
We have a help system with 2000+ topics. We're moving to a static site generator (Hugo), and I'm wondering about converting all of our xrefs into conkeyrefs. We have to re-architect our folder structure, so the xref links will be updated
anyway. I'm wondering if it's worth the effort when there are thousands of xrefs to other projects (dita files), as well as external links.
Is this something people have done? Is there an easy/automated way to do this?
Thanks!
Ed Marsh

Join main@dita-users.groups.io to automatically receive all group messages.