Skip to main content
April 7, 2014
Answered

Roundtrip formatting not working

  • April 7, 2014
  • 1 reply
  • 581 views

My issue is that when I open an XML file in FrameMaker, the formatting is not using my application that I set up. I'm not sure where this is controlled.

This is what I did. I made a copy of the Structure\xml\DITA folder to create Structure\xml\MyDITA. I converted my documents to DITA and updated the application template and EDD (formatting only) in MyDITA folder. I did not touch the DTD.

When I save my file as XML I get no errors, but when I open the XML in FM, the formatting is not using my template in MyDITA application.

When I open the XML file in FM and selected StructureTools > Set Structured Application and it is set to DITA_1.2_topic. When I set it to MyDITA it has no effect on the formatting.

What is controlling which application to use when the XML file is opened? I have a custom XML application that works just fine. The Doctype in my XML file is:

<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd"

I hope this is an easy question to answer. Thanks!

Karene

This topic has been closed for replies.
Correct answer ScottPrentice

HI Karene...

Using the Set Structured Application command is not "permanent" when used on an XML file. You can use this to check the current app assigned to a file, but don't bother setting it there.

You need to assign the proper app on file open. This is done by making sure that you have a valid structure application definition for your app (in the Structure Application Definition file) AND making sure that app definition is set up properly in the DITA Options dialog (the application mapping section). It sounds like the DITA 1.2 app is still selected in Options.

In DITA Options, select the "DITA v1.1" option, then click the "..." button to the right of the associated drop list. In the Mapping Manager dialog, choose New Mapping from the Mapping Tag list, give it some name ("MyDITA 1.1 Mapping") and choose APP_MAPPING_DITA_1.1 from the Mapping Type list. Now, in the Mapping Manager dialog, enter the doctype for your app .. "topic" (based on your example), then enter the application name "MyDITA", then select the Type "TOPIC" (in this case). Now choose Add/Edit. If your app supports other topic types, you'll need to add them to the mapping list. When you're done choose OK. In DITA Options you can now select your app mapping in the list (or it may already be selected).

In theory this should "work" .. you may need to exit and restart FM to get it to set properly.

Yes .. it's not simple or straight forward, and the docs are pretty weak.

<shameless-plug>

No pressure .. but have you looked into (or heard of) DITA-FMx? It simplifies this whole process considerably (although app development is still a bit of a learnign curve), and makes book publishing from DITA much easier.

     http://leximation.com/dita-fmx/

</shameless-plug>

Cheers,

...scott

Scott Prentice

Leximation, Inc.

www.leximation.com

1 reply

ScottPrentice
Inspiring
April 7, 2014

Hi Karene...

What version of FM are you using?

Assuming you're using FM11 or 12 .. you'll need to go into DITA Options and set up an application mapping that tells FM to use your app for the given topic type(s). In order to do that you'll need to have added a structure application definition for your app(s). Use the Structure Tools > Edit Application Definitions command to open the structapps file, then add a new app definition for your app (specify the template, the DTD, and so on). If you need help, take a look at the default application definitions in the "Global Application Definitions" file.

Also .. make sure that in your EDD, you've updated the ApplicationName to be your app name, and that EDD has been imported into the template that is specified in your structure application definition.

There are many other pitfalls that you may encounter, but that's a start.

The following topic may be helpful. It's written for use with the DITA-FMx applications, and some bits may not apply, but the general idea is good ..

     http://docs.leximation.com/dita-fmx/1.1/?ditafmx_cloningtapps.html

Cheers,

...scott

Scott Prentice

Leximation, Inc.

www.leximation.com

April 7, 2014

Hi Scott,

Sorry, I forgot to mention I am using FM10. I'm going to review your reply now and will post if I still cannot resolve it. Thank you so much!

Karene