FixBookRefs
Normalizes all references in the files of a FM book file.
Use this function to rebuild and correct all references (xrefs, links, conrefs, and image references) after aggregating loose DITA topics into “chapter” files. Call this function using the “FixBookRefs” parameter to update the active book, or pass the bookIdOrName value (as a string) after this parameter to update a specific book. In order to properly update the references in the book, the fm-ditabook/@href attribute must be set to the map’s path and file name. You can set this attribute before calling FixBookRefs, or you can pass this value as the mapFile parameter.
Return Value
- 0
- Failure. Unable to update the specified book. It is also possible that DITA-FMx is not available for calls. Verify that DITA-FMx is registered in the maker.ini file using the client name of “ditafmx”.
- -1
- Failure. bookIdOrName is not a structured book.
- -2
- Failure. No non-generated files in book.
- >0
- Successfully updated the specified book (this is the id of the book processed).