Page 1 of 1

Resolving content references using Catalog.xml file

Posted: Wed Jan 10, 2018 6:50 am
by Sangeeta
Hi,

I have moved some file from Arbortext to oXygen. As mentioned in this post we too have DITARefs functionality of Arbortext to give references of type
<ph conref="ptcProduct.dita#ptcProduct/WCQMSCAPA"></ph>

The conref DITA file ptcProduct.dita is in some other folder. I created catalog.xml file and gave link to it in the Preferences dialog box. The references are resolved in oXygen editor, but in the PDF these references are not created. Can you please help? My catalog.xml is as below:

catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<uriSuffix uriSuffix="ptcProduct.dita" uri="ptcProduct.dita"/>
</catalog>

Also, we have 3-4 conref files. Can I move all conref files in one folder, create single catalog.xml and give reference to the catalog.xml in Preferences dialog box?

I used the following post for reference, but could not resolve references:
post34653.html?hilit=conref%20paths#p34653

Best regards,
Sangeeta

Re: Resolving content references using Catalog.xml file

Posted: Wed Jan 10, 2018 9:44 am
by Radu
Hi Sangeeta,

Using XML catalogs to resolve the conrefs to another location will only work when editing inside Oxygen.
The DITA Open Toolkit publishing process is separate and it does not have such support so somehow you will probably need some kind of customization to make it work.
For example you may use a custom ANT build file:

https://www.oxygenxml.com/doc/versions/ ... -file.html

which before the transformation starts copies that folder containing content references someplace in the input folder and then removes it after the transformation ends. For the publishing part you could also try to register and ask around on the DITA Users List, see if others have the same problem and how they managed to overcome it.

About this remark:
Also, we have 3-4 conref files. Can I move all conref files in one folder, create single catalog.xml and give reference to the catalog.xml in Preferences dialog box?
Ideally for an usecase as yours you would not make direct conrefs. You would use conkeyrefs and someplace in the DITA Map define the keys which point to each topic containing reused content. In this way, the conkeyrefs would have a fixed value, no matter where your reused content resides. This will also ensure that the publishing process works.
If you still want to use conrefs and you want something more flexible than an XML catalog, we have the API which would allow you to implement an Oxygen plugin which would take care of resolving all such references using your custom functionality. But again, the publishing part would need to be handled separately.

Regards,
Radu