Creating the File Structure for Dynamic Import

The following is an example of how to store document files on your system prior to importing and how to re-create the documents after importing.

This example is useful if you have single-source files that are used in multiple books.

Example:

Assume that you have several book files in a folder (in the example below the folder is named Docs). Under that folder you have the .fm files that are in the book file(s) (in the example below, the folder is named TextFiles). In addition, some of the .fm files may be referenced in more than one of the book files. The documents are stored as shown below.

Assume the following about the documents and files:

  • intro.fm, notice_pg.fm, and the logo.tif are in both the sysadmin.book and user.book files.
  • SA_tools.fm is only in the sysadmin.book.
  • overview.fm, user_tools.fm and the welcome.tif are only in the user.book.

To maintain the use of a single file or data object in Contenta, the file structure on your system must be modified prior to importing into Contenta. The modifications help to ensure that, in Contenta, the data can be maintained, modified, and managed as a single source of information.

Perform the following steps prior to importing the files:

  1. Create a new folder corresponding to each .book file.
  2. Move each book file into its corresponding folder.
  3. Move all referenced .fm files into the same folder as the .book file.

    If a .fm file is referenced in more than one book, copy it to each folder where it is referenced by the book. The copies are deleted in a later step prior to import into Contenta so be sure to note where the copies are located.

  4. Create a folder named Graphics in each of the folders containing the books.
  5. Move all graphics referenced by the book into the Graphics folder.

    If a graphic is referenced in more than one book, copy it to each folder where it is referenced by the book. The copies are deleted in a later step, prior to import into Contenta so be sure to note where the copies are located.

  6. Validate the references in each book file. This will involve rebuilding the references in the book files and validating the references to all of the graphics.

    When validating references, make sure that you use relative rather than absolute paths within FrameMaker.

  7. After validating all references, remove any duplicate copies of reused graphics or .fm files so that they only appear once in the hierarchy. Do not attempt to perform further validation in FrameMaker at this stage because references may get deleted when files are saved.
  8. Remove the any old, empty folders in the hierarchy.

In the previous example, the following would be the required steps for restructuring the files prior to import:

Example:

  1. Create two folders under the top level Docs folder, named SA_unit and User_unit.
  2. Create a folder named sysadmin within SA_Unit, then a folder named Graphics within sysadmin.
  3. Create a folder named user within User_unit, then a folder named Graphics within user.
  4. Move sysadmin.book into the sysadmin folder and user.book into the book folder.
  5. Move SA_tools.fm, intro.fm and notice_pg.fm to the sysadmin folder and logo.tif to the sysadmin/Graphics folder.
  6. Move User_tools.fm and overview.fm to the user folder and welcome_gui.tif to the user/Graphics folder.
  7. Copy the files intro.fm and notice_pg.fm into user folder. Copy the file logo.tif into the user/Graphics directory.
  8. Validate all the references in the two books.
  9. Delete the files intro.fm and notice_pg.fm from the user folder. Delete the file logo.tif from the user/Graphics directory.
  10. Delete the old folder structure (Docs/TextFiles and Doc/Graphics).

In this example, all files that are in both books are placed under a single folder, the SA_unit folder.

Note that the files could be under the SA_unit folder or the user_unit folder but not in both folders if you want to maintain the use of a single data object in Contenta. After importing, in Contenta, the data object is reused in other books so that it can be maintained as a single source of data information.

The addition of the SA_unit and User_unit folders to the structure ensures that the .fm files and the graphics are imported under the same parent container, a requirement for the FrameBook tools.

The data is imported into a hierarchy in Contenta with the graphics folders under the sysadmin container and the user containers.

You must move (cut and paste) the graphics folder so that it is on the same level as the container that houses the fm and book files as shown on the left.
SA_unit > sysadmin > intro.fm and notice_pg.fm into User_unit > user
SA_unit > Graphics > logo.tif into User_unit > Graphics

You can now reuse the files (data objects) that contain the data which is to appear in both books.

In this example, you would reuse:

The hierarchy in Contenta after moving the graphics container and reusing the files is shown.

Files (data objects) that are reused are single-source data that appears in multiple books. When an instance of the data is placed in a project and modified, then posted, the data is updated in all documents in which it appears.