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 8, 2014

Hi Scott,

Thanks for your help. I'm using FM10. My new application is in the structapps file and I have verified this with StructureTools > Edit Application Definitions command that it is there.

My EDD does have the new ApplicationName. I imported the EDD into my template and into the structured document and saved as XML again. When I open the XML, the application is still set to DITA_1.2_topic. I don't know where this is coming from.

When I open the structured FM file and choose StructureTools > Set Structured Application, it is set to MyDITA. I save the file as XML. I open the XML in FM and now the application is set back to DITA_1.2_topic.

I've searched for DITA_1.2_topic in my application and it is not there. What in the world is going on?

When I select DITA> DITA Options, it is set to DITA v1.2. I'm having trouble figuring out how to add a new mapping as my application does not appear in any of the dropdowns in this dialog. My application does appear in the Set Structure Application dropdown however.

Any other thoughts? Should I start over with a copy of the DITA 1.1 application again?

Karene

Karene

April 8, 2014

Okay. I tried something in the DITA Options dialtog that looks hopeful. I get an error that says "Unable to find the required structured application setting. Please check the settings in the ditafm.ini file." I'm off to look for that file now.

Sure wish this was documented more clearly...

Karene


I cannot find any documentation on the ditafm.ini file, but this is what I have and it's not working. My application name is "MyDITA-Topic". The folder name where I have my apps is called "MyDITA"

Can you tell me if I have something wrong here?

Thank you!

[DitaCompatibilitySettings]

DitaVersion=1.1

UseApplicationSectionForDITA_1.1=MyDITA

UseApplicationSection=DITA_1.2_Applications

[GeneralImport]

TableProcessing=1

[BDB_DITA]

_SectionType = APP_MAPPING

topic = MyDITA-Topic