Apply a transformation in the dita source

Post here questions and problems related to editing and publishing DITA content.
gbv34
Posts: 80
Joined: Thu Jan 20, 2022 12:36 pm

Apply a transformation in the dita source

Post by gbv34 »

Hello,
I recently stumbled upon a difficulty where I wanted to modify the display of a title to concatenate it with a metadata value.
I succeeded in doing it by using a template to override the HTML5 transformation, however it finally seems in my case that my publishing platform resolves the title of the publication from the map source and doesn't apply my transformation for this element.

Basically, to make it a little more understandable:

Locally -> HTML5 output -> title.vrm_version_prodname = OK
SaaS-platform -> the title is not taken from the HTML5 output but from the XML source. Title remains "title"

The only solution I have would be to modify on the fly the XML source of the map in the temp folder, i.e, during the transformation applying the concatenation transformation not for an HTML5 output but for DITA source.

Is there any way to achieve this?
------
Gaspard
julien_lacour
Posts: 306
Joined: Wed Oct 16, 2019 3:47 pm

Re: Apply a transformation in the dita source

Post by julien_lacour »

Hello,

Is your XSLT modification (I suppose from here) available in the SaaS-platform? This platform should use DITA-OT or Oxygen Publishing Engine in order to transform your DITA documents into HTML files.

As best practice, when modifying default plugins, you should follow these steps
  • Create a custom DITA-OT plugin
  • Create the custom XSLT stylesheet, based on the original one (in your use-case org.dita.html5 plugin)
  • Run the DITA-OT integrator in order to allow the usage of the new plugin
  • (Optional) Copy and integrate the plugin on every application that will use it (Oxygen, SaaS, etc.)
Why this best practice? Because if you update Oxygen Publishing Engine or DITA-OT (or Oxygen), you may lose your customization (due to the file override on update) or if the default process changes you will not be up-to-date with it.

Regards,
Julien
gbv34
Posts: 80
Joined: Thu Jan 20, 2022 12:36 pm

Re: Apply a transformation in the dita source

Post by gbv34 »

Hi Julien!
Thanks for your answer.
That's exactly what I usually do for my plugins and in this case, I initially assumed the OT processing in the Saas server would provide the concatenated title to the publication. However, it seems their connector uses additional processing, among other things the fact they pulled the title from the ditamap and overlook the one processed via my plugin.

So, that's why I'm looking a way to insert the concatenated title in the data source (in the temp folder of the OT) instead of in the transformation.
------
Gaspard
chrispitude
Posts: 585
Joined: Thu May 02, 2019 2:32 pm

Re: Apply a transformation in the dita source

Post by chrispitude »

Hi gbv34,

It's possible that the SaaS processing diverges after preprocess and does not use the html5 processing. For example, ePublisher works this way - templates we implement at the dita.xsl.topicpull extension point are applied, but templates at the dita.xsl.html5 extension point are not.

You could try a test like adding a dita.xsl.html5 template to remove all <p> elements (or something equally noticeable) and see if it gets applied or not. And then you could try a similar experiment with dita.xsl.topicpull to see if it is applied.
Post Reply