Documentation for the portal API is embodied in the product code. Here's how to get it into FM file for print, PDF, and so on.
Preparing portal documentation
Reference documentation for the portal is drafted inside the portal source files by the engineers. Chris Grinton has an extraction tool and XSL conversion that turns this into an intermediate XML file correctly formatted (we hope! :-) for input to the following process. This runs automatically on each product build.
Set up your structure application environment
- Ensure that you have copied the entire directory structure for the portal chapter to your PC. Specifically, you must have the app subdirectory that includes MGSportalTemplate.fm, portal.dtd, portal_EDD.fm, and portal_rules.fm.
- Ensure that your structapps.fm file contains the definition of the MGS Portal application. The structapps.fm file lives in your FM 7 installation, normally somewhere like C:\Program Files\Adobe\FrameMaker7.0\structure. The definition it should include looks like this (at time of writing...):
Application name: ManageSoft Portal DOCTYPE: documentation DTD: C:\doc\src\customization\portal\app\portal.dtd Read/write rules: C:\doc\src\\customization\portal\app\portal_rules.fm Template: C:\doc\src\customization\portal\app\MGSportalTemplate.fm Namespace: Disable Use default API client. XML Display Encoding: FrameRoman XML Export Encoding: UTF-8 CSS2 Preferences: Generate CSS2: Disable
- Ensure that all your file versions are up to date!!!
Doing the conversion
- To receive the latest copy of the intermediate XML file, ask the Build Police for the latest build location ofinst/doc/PortalReference.xml.
- Browse the file from that location, and in the web browser do a File > Save As to save it with a useful name into your working portal directory (C:\doc\src\customization\portal).
- Open the file in a flat text editor (such a Notebook) (NOT in Word or FM).
- On the first line, between the <xml...> tag and the <documentation> tag, insert the doctype and DTD spec:
<!DOCTYPE documentation SYSTEM "C:\doc\src\customization\portal\app\portal.dtd">
- Immediately after the <documentation> tag and before the first <namespace...> tag, insert the following tags and text:
<intro> <head>Portal API reference</head> <section><para>This chapter provides a detailed reference for the factory-supplied APIs available to the operations portal. For an introduction to extending and customizing the portal, see the previous chapter.</para> </section> </intro>
- The start of your file now looks something like this:
<?xml version="1.0" encoding="Windows-1252"?> <!DOCTYPE documentation SYSTEM "C:\doc\src\customization\portal\app\portal.dtd"> <documentation> <intro> <head>Portal API reference</head> <section><para>This chapter provides a detailed reference for the factory-supplied APIs available to the operations portal. For an introduction to extending and customizing the portal, see the previous chapter.</para> </section> </intro> <namespace...
- Save the amended file.
- Open the amended file in Structured Framemaker.
- Answer the question "Use structure application" (if asked) by picking "ManageSoft portal" from the pulldown list.
- Change the name of the previous version of this chapter, for example to "old_portal_reference.fm". You will use this to identify what has changed and needs review in the new version.
- Change the filename by doing a File > Save As. The filename must match the one used in the book for theCustomization and Extension manual. Currently the name is "06_portal_reference.fm".
- Update the book, including regenerating the table of contents.
- Hand tune the TOC by adding the Heading 1 no TOC title Contents, and adding forced line breaks in chapter titles that are too long for the format.
- Use FM's file differencing feature to flag what has changed in the new version by comparing it with the one you renamed at step 1. Review new material, provide feedback to the author-engineers, and loop.
- Save as PDF to provide an e-book copy for engineers (make sure that hyperjumps are turned on and the heading structure is sensibly indented!); or prepare the PDF for press version.