About Arbortext Styler > Extending Stylesheets > Tips for Editing Stylesheet Source
  
Tips for Editing Stylesheet Source
Tips when Editing FOSI Source
If you plan to add e-i-cs to the FOSI source of an element, which is permitted, bear in mind that the order of the e-i-cs in the source is critical: the order in the FOSI determines the order of priority. The output engine will run through the e-i-c entries in the FOSI source and simply use the first context it matches in the source. This could have some unexpected effects if you maintain multiple contexts of the same element.
Any nested or if, else or else/if conditions in your stylesheet will be flattened to a single layer of top level conditions when the stylesheet is exported to FOSI. See Nested and If, Else/If, and Else Conditions in Exported Stylesheets for details on how to identify the new conditions and translate them to FOSI attribute tests.
Tips when Editing XSL Source
Arbortext Styler uses XSL to generate the following outputs: Print and PDF (via the XSL-FO engine), HTML File, Web, HTML Help, and RTF. If you edit any of these XSL-based sources, via the Edit > Edit Element Source menu option, you will be presented with a window containing XSLT data. To be more specific, you will make use of the following stylesheet fragments when electing XSL-based source for a particular output format:
XSL-FO (for Print and PDF) and XSL-FO RTF - XSL-FO stylesheet
XSL-HTML File, XSL-HTML Help, and XSL-Web - XSL-HTML stylesheet
A good general knowledge of XSLT (including XPath), and either XSL-FO or XSL-HTML, will therefore be required when making source edits of this nature.
The XSLT generated by Arbortext Styler is generally XSLT 1.0 and XPath 1.0 compliant. You may also use XPath 2.0 and XSLT 2.0 code in XSL edited source, since this is supported by the XSL transformation engine.
Arbortext Styler generates a minimum of two XSL templates for each context of an element, depending on the formatting that has been applied. The type of template is identified in the XSL source by the presence of the mode attribute. The two default templates are:
Template used to style the final output of the element - no value for mode attribute
Template used to add necessary generated text to the context - mode=expand-gentext
Further templates may also be created, depending on the formatting requests that have been made for the element - for example a template with a mode=toc-mode definition will be generated for each table of contents that references the selected context. Arbortext Styler numbering is defined in templates with the definitions mode=styler-numbering or mode=styler-LabelAndNumberMarker.
When electing to edit an element's source, all the templates that have been generated for an element in this way are listed in the selected XSL source file - you may edit any of the templates but you must not delete them.
Any nested or if, else or else/if conditions in your stylesheet will be flattened to a single layer of top level conditions when the stylesheet is exported to XSL. See Nested and If, Else/If, and Else Conditions in Exported Stylesheets for details on how to identify the new conditions.