Page 1 of 1

Can I use 'html5' DITA-OT plugins with PDF Chemistry?

Posted: Tue Dec 31, 2019 8:57 pm
by chrispitude
Hi all,

I have a DITA-OT plugin that modifies the 'html5' output by plugging into the following extension points:

Code: Select all

dita.xsl.topicpull
dita.xsl.strings
dita.xsl.html5
When I install this plugin into the Oxygen DITA-OT, it modifies the "DITA Map PDF - based on HTML5 & CSS" output as expected. However, it does not affect the PDF Chemistry output as expected.

I was hoping that because PDF Chemistry is based on HTML5, it would automatically inherit any modifications to the 'html5' transformation. How can I incorporate my plugin into PDF Chemistry?

I do understand that PDF Chemistry's CSS functionality provides very powerful content modification capabilities. I ask this question because we need the massaged HTML5 output for non-PDF flows, and it would be nice to reuse the HTML5 plugin instead of re-implementing its functionality via CSS.

Thanks!

Re: Can I use 'html5' DITA-OT plugins with PDF Chemistry?

Posted: Tue Jan 07, 2020 12:44 pm
by julien_lacour
Hello,

Your extension points are used by the DITA-OT plugin which means that all the DITA transformation will use these extensions points (including the DITA Map HTML5 and obviously the DITA Map PDF - based on HTML5 & CSS transformations).

In DITA Map PDF - based on HTML5 & CSS case, Oxygen PDF Chemistry processor is applied on the HTML5 intermediary file to generate the PDF.
The CSS customization files are applied on this HTML5 file, this is why you can see your modifications inside your browser and debug them.

Oxygen PDF Chemistry isn't based on HTML5, it is based on CSS and Apache FOP XSL-FO to generate PDF from XML or HTML documents.

If you don't need PDF outputs, Oxygen PDF Chemistry processor is not needed, you can simply use the DITA Map HTML5 transformation and customize your file with CSS stylesheets.

Regards,
Julien

Re: Can I use 'html5' DITA-OT plugins with PDF Chemistry?

Posted: Wed Jan 08, 2020 3:26 pm
by chrispitude
Hi Julien,

Thanks for your reply. Unfortunately my original post mistakenly referenced the wrong transformation name. Here is the corrected question:
When I install this plugin into the Oxygen DITA-OT, it modifies the "DITA Map HTML5" output as expected. However, it does not affect the "DITA Map PDF - based on HTML5 & CSS" (PDF Chemistry) output as expected.

I was hoping that because PDF Chemistry is based on HTML5, it would automatically inherit any modifications to the 'html5' transformation. How can I incorporate my plugin into PDF Chemistry?
A more specific way to ask my question is: given the three extension points I'm using in the first post, why aren't they applied to the intermediate HTML5 file passed to PDF Chemistry?

Thanks!

Re: Can I use 'html5' DITA-OT plugins with PDF Chemistry?

Posted: Thu Jan 09, 2020 1:07 pm
by julien_lacour
Hello,

Could you please send us a small sample and your customization at support@oxygenxml.com.
I will check why the extension point isn't applied on the intermediary HTML5 file.

Regards,
Julien

Re: Can I use 'html5' DITA-OT plugins with PDF Chemistry?

Posted: Sat Jan 25, 2020 4:22 pm
by chrispitude
Hi Julien,

I found that the HTML5 extension points (dita.xsl.html5, dita.xsl.strings) are applied; it is specifically the dita.xsl.topicpull extension point that is not applied by PDF Chemistry. I will send a testcase so you can confirm if this is an expected behavior or not.

Thank you!

Re: Can I use 'html5' DITA-OT plugins with PDF Chemistry?

Posted: Tue Jan 28, 2020 4:17 pm
by chrispitude
Hi all,

Julien took a look at my testcase and confirmed the problem:
I reproduced your problem, it's a bug on our side: the topicpull is done during the transformation but its modifications are not copied to the merged.html output in this particular case. It seems that this problem is related to the HTML5 PDF transformation only.
I already logged it inside our tracking system, we will let you know where a solution will be available.
Thanks Julien!

- Chris

Re: Can I use 'html5' DITA-OT plugins with PDF Chemistry?

Posted: Thu Jan 30, 2020 11:34 am
by julien_lacour
Hello Chris,

You can resolve this situation by adding an XSLT Extension Point to your DITA-OT plugin:

Code: Select all

<feature extension="com.oxygenxml.pdf.css.xsl.merged2merged" value="xref.xsl" type="file"/>
Then use the following stylesheet:
xref.zip
(624 Bytes) Downloaded 319 times
Regards,
Julien