Topics

Non file based content #DITA-OT

Paul Danaher
 

We have maps and topics stored in a database which can be retrieved via a REST service we wrote. What I'd like to do is pass in a DitaMap id as an input to the DITA-OT and have a cusyom parse retrieve the map content and pass the content to the toolkit for parsing. Every topic in the map has an id also whose content can be retrieved via the REST service and the toolkit would need to call the parser to retrieve the topic content, etc. . Is there anyway of customising the toolkit to allow this type of behaviour ocustom plugin maybe)?  Note I have managed to get this working by editing the core code as a proof of concept which I know is a NO NO and this has the downside of preventing me to upgrade easily. Any thoughts. Thanks.

Paul

Jarno Elovirta
 

Hi

We don’t have an extension point to hook up code to do the retrieval, but if you can use the XML  catalog to rewrite your IDs into URLs, OT will handle the HTTPS traffic for you. Then, you need to add a custom parser to convert your REST output into DITA. See https://github.com/jelovirt/org.lwdita/blob/master/src/main/plugin.xml#L43 for example.

Cheers,

J

On 16. Apr 2020, at 20.57, Paul Danaher <danaher.paul@...> wrote:

We have maps and topics stored in a database which can be retrieved via a REST service we wrote. What I'd like to do is pass in a DitaMap id as an input to the DITA-OT and have a cusyom parse retrieve the map content and pass the content to the toolkit for parsing. Every topic in the map has an id also whose content can be retrieved via the REST service and the toolkit would need to call the parser to retrieve the topic content, etc. . Is there anyway of customising the toolkit to allow this type of behaviour ocustom plugin maybe)?  Note I have managed to get this working by editing the core code as a proof of concept which I know is a NO NO and this has the downside of preventing me to upgrade easily. Any thoughts. Thanks.

Paul