Creating a "Merge" type OT transform

Post here questions and problems related to editing and publishing DITA content.
EJB
Posts: 12
Joined: Mon Dec 13, 2010 12:59 pm

Creating a "Merge" type OT transform

Post by EJB »

Hello,

One of the transformation types available in the DITA-OT (at least in 1.4.3) is "merge", which produces a single file from a set of dita topics tied together by a map. We've been using it in our CMS to produce a single-file output, but for various reasons, the CMS transform is broken and I was hoping to produce the same output in Oxygen as a stopgap.

This is using Oxygen 12 but with the DITA-OT 1.5.4. Rather inconveniently, our CMS uses the 1.4.3 OT so I'm not even sure I can run the merge in 1.5.4, but a tip on how to configure the type would at least allow me to troubleshoot it further, even if I have to load 1.4.3 into Oxygen! (urgh)

So my problem is that I'm not sure how I can set this up as a transform in Oxygen as it doesn't appear as an available type if I duplicate one of the existing transforms under "DITA OT transformations". Is there some way of setting up a DITA transform with some arbitrary type value?

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

Re: Creating a "Merge" type OT transform

Post by Radu »

Hi Emma,

AFAK in a standard DITA OT distribution there has never been a merge transformation type.
Probably the CMS customized a DITA-OT distribution in order to achieve this.
But the result is quite easy to obtain even in a not-customized DITA OT.

If you edit the main DITA Map, on the root <map> element you can set the attribute:

Code: Select all

<map chunk="to-content">....
More about chunking can be found here:

http://docs.oasis-open.org/dita/v1.2/os ... l#chunking

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
EJB
Posts: 12
Joined: Mon Dec 13, 2010 12:59 pm

Re: Creating a "Merge" type OT transform

Post by EJB »

Thank you for the suggestion although I'm not quite sure if that will help. The purpose of the exercise is to get a single DITA XML file that I can then run a different stylesheet on to create bespoke XML structures for various production purposes.

I had a poke at the DITA-OT build file that our CMS is using and I see one of my secretive colleagues has indeed been at the file and 'merged' seems to be a dummy parameter to trick the OT into created its temporary merged file without doing anything further. I think I will test whether I can simply adapt the Ant script used by the CMS for use in Oxygen - so far, it has some kind of path problem and is moaning about every single schema file reference, but hopefully I can beat it into submission!
Radu
Posts: 9446
Joined: Fri Jul 09, 2004 5:18 pm

Re: Creating a "Merge" type OT transform

Post by Radu »

Hi Emma,

My mistake, my suggestion was for generating a single merged XHTML file but you wanted a file with the entire merged DITA content.

From what I know the PDF publishing creates at some stage such a merged file.
So if you edit the DITA Map to PDF transformation scenario and in the Parameters tab you set the parameter clean.temp to no, after the transformation is over you should obtain in the temporary files directory a file called mapFileName_MERGED.xml which has all topic references expanded. Maybe this will help.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
EJB
Posts: 12
Joined: Mon Dec 13, 2010 12:59 pm

Re: Creating a "Merge" type OT transform

Post by EJB »

Thank you very much for the suggestion. Yes, that does sound as if it might be what I need. I shall look into that further to see if I can use it.
Radu
Posts: 9446
Joined: Fri Jul 09, 2004 5:18 pm

Re: Creating a "Merge" type OT transform

Post by Radu »

Hi,

If anybody else is interested in this, I created a special DITA OT plugin which only produces the merged DITA output file:

https://github.com/oxygenxml/dita-merged

The plugin will be integrated by default with Oxygen 18.1 (Autumn this year).

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