Stylesheet Development with APP > Adding APP Code to Stylesheet Source > The Arbortext Advanced Print Publisher Formatting Object Model (FOM)
  
The Arbortext Advanced Print Publisher Formatting Object Model (FOM)
The APP Formatting Object Model (FOM) provides access to the functionality of Arbortext Advanced Print Publisher (APP) via a set of object definitions. You may then write stylesheet code that calls these objects, queries the information they hold or manipulates their current configuration.
The objects defined in the FOM can be grouped under four main headings. Each group displays specific purposes and behavior:
1. Application objects
Describe the state of the APP application, and provide access to system-wide components such as Perl, variables, strings, macros, and templates. Objects required for events and exceptions are also described under this heading. These objects are always available.
2. Content objects
Define the structure of a template before formatting. The objects required to construct a template are included in this groups, for example streams, pages, frames, and graphics. These objects only exist once a template is open in APP, and will persist when the template is saved.
3. Formatting objects
Control access to APP whilst the template is being formatted. The objects in this group provide access to state information, allow generated content to be output, or change current format styles dynamically. These objects are only available during formatting, although selected objects can be referenced from the Content objects to specify default styles and behavior.
4. Datatype objects
Describe information types that aren't already provided by the JavaScript library, such as colors, lengths, rules, and fonts.
Please refer to the Formatting Object Model Reference for full definitions of the objects in the FOM and their methods, properties, and constants.
The edited source feature of Arbortext Styler provides an external interface into APP that Arbortext Styler can use to communicate with the Formatting Object Model. Adding code based on FOM object definitions to a .style file will enable the stylesheet to directly interrogate objects, both reading and changing properties, and execute JavaScript code fragments when it is processed.
JavaScript is the accepted coding language for accessing the FOM. You must be familiar with this programming language to be able to extend your Arbortext Styler stylesheet to include APP code.