Publishing HTML/PDF with custom DTD

Post here questions and problems related to editing and publishing DITA content.
Guenter_TUGraz
Posts: 3
Joined: Mon Aug 07, 2023 9:13 am

Publishing HTML/PDF with custom DTD

Post by Guenter_TUGraz »

Hello,
i work on a reorganisation of my Dita framework. Former i used a copy of frameworks in a special directory (git repo), which includes many customizations (DTD, HMTL and PDF-output).
This architecture make problems with the upgrade from Oxy23.1 to Oxy24.1. So i want to use the default frameworks with an extension script and publishing templates.

The validation of custom DTD with extension script work well (catalog.xml), but not the transformations to HTML and PDF.
First i get this error:
Failed to run pipeline: The entity -//TU Graz//DTD DITA Campus Online Doctypes Map//EN / file:/C:/co-doc/doc/archive/Guenter/tu.graz.co.doctypes.map.dtd cannot not be resolved through catalogs. For security reasons files that are not listed in the DITA-OT catalogs and are not located in the DITA-OT directory are not read. You can disable this restriction by setting "-Dargs.disable.security.checks=yes" in the command line or the Oxygen transformation configuration dialog, the "Advanced" tab, in the "JVM Arguments" text field. Make sure all the input files come from a trusted source.
So i set the parameter as recommended to Dargs.disable.security.checks=yes.

Now i get this error message:
'file:/C:/co-doc/doc/archive/Guenter/Guenter.ditamap' could not be loaded. Ensure that grammar files for this document type are referenced and installed properly. Cannot load file: C:\co-doc\doc\archive\Guenter\map.dtd

How can i make sure, that the transformation use the custom DTD.
Best regards
Guenter
Radu
Posts: 9439
Joined: Fri Jul 09, 2004 5:18 pm

Re: Publishing HTML/PDF with custom DTD

Post by Radu »

Hi Guenter,
Publishing is done using the DITA Open Toolkit publishing engine as a separate process. The only way for the publishing engine to recognize a DTD specialization is for the DTD specialization plugin to be installed inside the DITA Open Toolkit:
https://www.oxygenxml.com/doc/versions/ ... gin_method

So if you add in the Oxygen framework a reference to an extra XML catalog for your specialization, Oxygen will use that XML catalog for editing and validating your XML files. But the publishing, being done as a separate process still needs the specialization plugin installed in the DITA Open Toolkit.

Not sure what do advice you, maybe you could have a copy of the DITA Open Toolkit specific for your project inside your framework extension and including the specialization plugin installed in it. And all your transformation scenarios would use in the Parameters tab a "dita.dir" parameter which points to your custom DITA OT.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Guenter_TUGraz
Posts: 3
Joined: Mon Aug 07, 2023 9:13 am

Re: Publishing HTML/PDF with custom DTD

Post by Guenter_TUGraz »

Hello Radu,
thank you for the information and the link. I hoped that i can use the publishing tool without creating a DTD specialization plugin. So i have to go the long way and will create this. :wink:
Best regards
Guenter
Radu
Posts: 9439
Joined: Fri Jul 09, 2004 5:18 pm

Re: Publishing HTML/PDF with custom DTD

Post by Radu »

Hi Guenter,
Sorry for the bad news, as a separate process the publishing engine needs to be self contained and have all specializations installed as plugins inside it.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply