How to convert Custom Docbook Topic to DITA

This should cover W3C XML Schema, Relax NG and DTD related problems.
gopinathselvamin
Posts: 5
Joined: Mon Nov 19, 2018 11:58 am

How to convert Custom Docbook Topic to DITA

Post by gopinathselvamin » Thu Dec 06, 2018 3:29 pm

Hi,

We have thousands of xml in Docbook and uses custom DTD files as shown below.
The second line in my docbook xml is as shown below
I am using Oxygen XML developer to convert these topics to DITA.
How to configure Oxygen XML to transform these custom docbook topics to DITA? Please help me with detailed steps.

<!DOCTYPE GS_Instruction PUBLIC "-//GS//DTD GS_Instruction element definition ver. 1.0//EN" "GS_Instruction.dtd">

Radu
Posts: 6398
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to convert Custom Docbook Topic to DITA

Post by Radu » Thu Dec 06, 2018 3:37 pm

Hi,

if you open a standard Docbook file in Oxygen (for example the one in "OXYGEN_INSTALL_DIR\samples\docbook\v5\sample.xml" and click the "Configure Transformation Scenarios" dialog, there is a predefined transformation scenario there called DocBook to DITA. Maybe you can duplicate that transformation scenario and then use it also for your Docbook-like XML documents.
If you want to batch apply a transformation scenario, you can right click a folder containing the XML files in the Oxygen Project view and then choose "Transform with" and choose the transformation scenario to use.

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

gopinathselvamin
Posts: 5
Joined: Mon Nov 19, 2018 11:58 am

Re: How to convert Custom Docbook Topic to DITA

Post by gopinathselvamin » Thu Dec 06, 2018 4:08 pm

Hi,

I tried those steps, the output Dita files doesn't have any contents.
Hope I explained my problem in a way that was understandable by you.
How to convert a custom docbook xml which is based on a custom dtd file into DITA?

Thanks,
Gopi

Radu
Posts: 6398
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to convert Custom Docbook Topic to DITA

Post by Radu » Thu Dec 06, 2018 4:22 pm

Hi Gopi,

You will probably need to look at the XSLT stylesheet used for Docbook to DITA conversion:

OXYGEN_INSTALL_DIR\frameworks\docbook\xsl\dbdita\db2dita\docbook2dita.xsl

and make changes to it so that it can also process your custom element names.

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

Post Reply