About Arbortext Styler > Extending Stylesheets > Editing Stylesheet Source Examples > Editing Source for FOSI
Editing Source for FOSI
Example: Editing the FOSI Source of an Element
In the following example, an offset is applied to the para element beyond that allowed by the Arbortext Styler properties. The General Purpose document type provided with Arbortext Editor is used to demonstrate how to add that offset.
Note that, although you can set the offset of the element in the Arbortext Styler interface, we are using offset as an example of how to edit the element's source. You can, if required, edit the offset of an element via the Offset field in the Text category.
Follow these steps to change the offset for the para element in the associated FOSI source:
1. In Arbortext Editor, select File > New.
The New Document dialog box opens.
2. Select DocBook in the Category list and Arbortext XML DocBook V4.0 in the Type list, then select the Sample option.
3. Click OK. The sample XML DocBook document opens in Arbortext Editor.
4. Select Styler > Edit Stylesheet.
Arbortext Styler opens the stylesheet associated with the XML DocBook document. This is a read only stylesheet so you will need to make a local copy if you wish to make changes.
5. Select FOSI as the Print Engine in the Print/PDF tab of the Stylesheet Properties dialog box.
6. In the Elements list, select the para element.
7. Change the properties in the Text category to be as close to the desired final output as possible, for example, set the Text size field to 12pt and set the Italic field to Yes.
8. In Arbortext Styler, select Edit > Edit Element Source > FOSI. You will see a Styler Warning dialog box asking you to confirm that you wish to proceed with editing the source of the element, rather than one of its contexts. Click Yes to continue.
The Source Editor opens with the FOSI source for the para element. The source is based on the current Arbortext Styler properties.
9. In the Source Editor, place your cursor after the font element in the first para in step context and select Edit > Modify Attributes.
The Modify Attributes dialog box opens.
10. Enter a value in the offset field, for example 0.4em.
11. Click OK to confirm the change and exit the dialog box.
12. Select File > Apply and Close to save the change and exit the editor. The edited source now applies for all contexts of the para element in the document.
When you select one of the para contexts in the Elements list, the Description field now confirms that the element has source edits for the FOSI.
You may also choose to edit the source of a single context of the para element only. Use the same steps as detailed above, but select the relevant element context in the Elements list before choosing the Edit > Edit Context Source > FOSI menu option. When you have completed the edit, only the selected context will display the visual indicators that it contains edited source, rather than the element and all its contexts. The change will apply only to the selected context.