Page 1 of 1

Conref to remote resource not resolving

Posted: Fri Dec 21, 2018 11:03 am
by d_croft
Hi,

I'm having trouble using external resources as conref targets in my DITA material. I want to embed some source code from Github to my documentation files, but Oxygen isn't letting me do that.

Getting the following error when transforming the material to HTML:

Code: Select all


Description: [DOTJ051E] Unable to load target for coderef "https://raw.githubusercontent.com/MyCashflow/Default-Email-Templates/master/src/pages/order/shipping-notification.html".
Using DITA-OT 3.2 for the transformation.

This used to work at some point but not anymore. Is it because of the newer DITA-OT version?

Re: Conref to remote resource not resolving

Posted: Mon Dec 24, 2018 11:02 am
by Radu
Hi,

This problem is related more to the publishing engine, especially as you are using a custom publishing engine and all Oxygen does is to run it.
I will assume your coderef looks like this:

Code: Select all

            <coderef href="https://raw.githubusercontent.com/MyCashflow/Default-Email-Templates/master/src/pages/order/shipping-notification.html" format="html"/>
I tested also with DITA OT 2.x and it failed exactly the same as DITA OT 3.2 to properly retrieve it. There is an issue registered for this:

https://github.com/dita-ot/dita-ot/issues/1762

In the Oxygen transformation scenario you are using there is a parameter called something like fix.external.refs. If you enable this parameter, Oxygen has some custom code which tries to download such resources in a way in which the publishing engine properly finds them.

Regards,
Radu