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:

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

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


Radu Coravu
<oXygen/> XML Editor

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?
Ed Marsh

Join to automatically receive all group messages.