The Book Structure Application

The Book structure application defines the fundamental structure and formatting that is applied to the topic files that become FM chapter files through the book-build process.

Because it’s possible to combine multiple topic types into a single chapter file, this structure application must contain the element definitions for all possible elements and structures that are included in the final book.

If you are using “ditabase” (the DTD that supports all of the basic topic types in a single DTD), it will be virtually identical to the Topic structure application. However, if you are using the “Doctype/Application Mapping” option which lets you use individual DTDs (and structure applications) for each topic type, you will need to create a special Book application that supports all of those topic types in a single EDD. The default Book application files are installed to FrameMaker\Structure\xml\DITA-FMx_1.2\Book.

The Book structure application definition (StructureTools > Edit Application Definitions) also specifies an “Import” XSLT file which is the first step of the conversion process. This XSLT is the piece that does the aggregation of DITA XML files into chapter-based FM files. It processes the root map, any sub maps, and all topic files to build a single XML file that is opened in FrameMaker and becomes the book and components.

If you look through this file (bookmap2fmbook.xsl), you’ll see that it adds FM-specific processing instructions that tell FrameMaker where the book file starts and where each of the chapter FM files start. You can modify this XSLT to accomplish additional custom processing as needed. One XSLT modification that may prove easy and useful is to pass metadata from the map or bookmap so it is added to the fm-ditabook element as attributes. These attribute values can then be used in various ways in the resulting generated book and chapter files. For more information on this see, Passing Map-level Metadata to the FM Book.

The resulting generated FM book and components are set up so that each XML file is represented by an fm-ditafile element. This element is used to provide a container on which to hang file-specific attributes, specifically the href attribute which is the path and filename to the original DITA topic file. This is needed for later processes to properly resolve references. Another attribute that is found on the fm-ditafile element is the mapelemtype attribute. The mapelemtype attribute is set on the top-level fm-ditafile elements and will have the value of the element name of the associated topic referencing element in the map. For example, a chapter element will result in an fm-ditafile element with a mapelemtype attribute set to ‘chapter’.