Getting Started

One simple approach to setting up and using Property Mapper with DITA-FMx.

Let’s assume that your source files are written in English and you want to produce PDFs in English and in German (additional languages can be added by following a similar approach).

Also assume that you’re using a “book-build” INI file and component templates in your build process for generating FM book and chapter files. (If you’re not familiar with these terms, please read the DITA-FMx documentation.)

  1. Create a new book-build folder for the German output as a sibling to your current English book-build folder.

    A good naming convention is to include the language code in the folder name. For example, your English output could be built in a folder named book-enu, and the German output in a folder named book-deu.

  2. If your current component templates are located in a folder within your book-build folder, move it up a level so it’s a sibling of the book-build folder(s). Then open the book-build INI file for your English build and update the value of BookTemplatesDir to reference the new component template folder location.

    This is done so the path referencing the component templates folder is the same in all book-build INI files (“../component-templates”). If you are using language-specific (or build-specific) component templates, this folder would be in the book-build folder, but if you’re planning on sharing the component templates between languages (made possible with the Property Mapper plugin), it’s best to move it up a level.

  3. Generate the English (or base language) property map file, then copy it to the English book-build folder and give it a meaningful name.

    Open the Book template file (or your main component template if it differs significantly from the template), and run the Property Mapper > Generate Property Map command. This creates an XML file that contains all of the supported properties for all of the supported objects in that file.

    This file is generated in the same folder as the file it was created from. Copy it to your book-build folder and give it a name like propertymap-enu.xml.

  4. Edit the property map file to include only the “important” properties.

    The initial property map file will include all of the possible properties. To reduce complexity, your property map file should only include the property definitions for those properties that will change in your localized output. Specifically, those properties that contain localizable strings (such as cross-ref formats and autonumber prefixes for notes and warnings).

    The property map file format is DITA. You can edit this file in a text editor or in FrameMaker (or another XML editor). Each property definition is contained within a dlentry element and property definitions for each supported object type are grouped within dl elements.

    Just locate and delete those properties that you know you won’t be changing for the localized output.

    You can test the property map file by running the Property Mapper > Apply Property Map command. This command prompts for the property map file to apply. Keep in mind though that unless you modify a property from the default settings, nothing will appear to happen.

  5. Edit the book-build INI file so it runs the PropertyMapper plugin.

    You actually don’t want to run this on the English build, but it’s good to set it up to run, then comment it out. That way the proper settings will be in place when you copy the INI into the language-specific folders.

    In the BookBuildOverrides section set the RunScript parameter to 1, set ScriptName to Pubs-Tools:PropertyMapper, and set ScriptArgs to the property map file name.

    [BookBuildOverrides] 
    ... 
    RunScript=1 
    ScriptName=Pubs-Tools:PropertyMapper 
    ScriptArgs=propertymap-enu.xml
    Note: The ScriptName value must exactly match (case sensitive) the value in the APIClients section of the maker.ini file that registers the plugin.

    If you are already running one or more publishing plugins, you’ll need to use the syntax to allow multiple scripts to run. The ScriptName and ScriptArgs values must start with a vertical bar character and use the vertical bar to separate the name and arguments for each plugin. The example below is one possible option.

    [BookBuildOverrides] 
    ... 
    RunScript=1 
    ScriptName=|Pubs-Tools:PropertyMapper|Pubs-Tools:MiniToc 
    ScriptArgs=|propertymap-enu.xml|%BOOKID%

    If you need to apply multiple property maps to the same set of files, see the information on the Automation topic.

  6. Test the PropertyMapper plugin during a book-build, then disable the plugin for English.

    Run a book-build and check the console log file to make sure the plugin runs and applies the specified properties. Keep in mind that assuming you haven’t modified any of the properties, nothing will appear to have been done. Just verify that it seems to work before continuing.

    Once you’ve verified this, you should disable the plugin for the English build; there’s no reason to run it when it’s not performing anything useful for the English build. If this is the only publishing plugin you’re running, just change the value of RunScript to 0. If you’re running other publishing plugins, make a copy of the ScriptName and ScriptArgs lines, and comment out the two copied lines. In the uncommented lines, remove the PropertyMapper name and args so it’s only running the other plugin(s).

  7. Copy the book-build INI file and any other language-specific support files (including the property map file) from the English book-build folder into the German book-build folder.

    If you’re using any publishing plugins or have scripts or include files that are referenced by the book-build INI file, you’ll likely need to update them for the new language after copying them into the new folder.

  8. Update the German property map file so the strings and other properties are correct for that language.

    You can test the changes by running the Apply Property Map command on an open XML topic.

  9. Update the German book-build INI file to re-enable the PropertyMapper plugin and reference the proper property map file.
  10. Now you should be able to run a book-build with your translated German topic files. Generate the book in the German book-build folder.