Copy link to clipboard
Copied
Hello,
I am currently working on a migration project for my firm.
I am using conversion tables to transform our FM files into DITA files and come across a few issues I would like to discuss with you.
Do you know if it possible to perform the following actions:
Many thanks in advance.
Best regards,
Marc
Copy link to clipboard
Copied
Hi Marc,
I believe the simple answer is "no" to all three requests, at least with the conversion table mechanism alone. Used in conjunction with ExtendScript, you could do these things.
Russ
Copy link to clipboard
Copied
Marc,
Russ is correct that a conversion table cannot make the changes you need. His suggestion to use ExtendScript is certainly a reasonable approach. Another is to save the conversion table output as XML using an XSLT post-process to make the desired changes. Then open the result in FM.
--Lynne
Copy link to clipboard
Copied
Yes, I did exactly this. I had large chapters that I wanted to split into DITA topics. I converted the chapter to DITA with nested topics, and then used ExtendScript to save off individual topics. I based the individual topics on my FrameMaker TOC -- I divided the file at those points, and used the heading text for the filename (substituting spaces and odd characters with an underscore).
I also use ExtendScript to assign IDs to topics. You need a recursive function to walk the tree -- use that to find a topic element, and then assign the ID value. The good news about ExtendScript is that it's JavaScript, so you can use a lot of existing patterns. Get the book "Javascript: The Good Parts" by Crockford (I think). That has an excellent pattern for recursive functions (and much much more).
Another thing for ExtendScript... There are often other things you can't do with a conversion table, or else they're notoriously difficult. For example, I found it much easier to wrap images and captions in fig groups via ExtendScript. And I had other little cleanup things that I could identify and do in a general way.