About Arbortext Styler > Extending Stylesheets > Extending the Edited Source Function by Adding More Complex Code > Creating More Complex Edited Source
  
Creating More Complex Edited Source
1. Export your stylesheet via the File > Export menu option, selecting the desired output format from the list. Save the exported XSL file to your preferred directory location - for the purpose of completeness, save it to the same directory as the original document.
2. In Arbortext Editor associate the newly exported XSL stylesheet with your document via the Format > Select Stylesheets menu option, defining it as the desired stylesheet for your required output type.
3. You can now edit the exported XSL to make any changes you require - update templates, add new templates, and so on. Save the changes to the exported XSL then publish the original document to the desired output type to verify the changes have the desired effect. In this way you can test all changes you make.
4. To complete the process, you must merge the edited source for the elements you changed back into the original .style file. Carry out the following steps for each element you edited:
a. In Arbortext Styler, select the element and elect to edit its source by selecting Edit > Edit Element Source and choosing the same output type from the list as you selected in step 1 above.
b. Delete all markup and content from the edited source window that appears. Leave the window open.
c. Copy all the templates for the element you updated from your exported and updated XSL file.
d. Paste the copied templates from the edited XSL file into the Arbortext Styler edited source window for the element.
e. Select File > Apply and Close in the edited source window. You have now updated the element as it appears in the .style with the changes you made in your exported XSL file.
* 
It is important to note that edited source that is embedded in a .style file has its markup characters “escaped”; for example < characters are changed to &lt; references. For this reason it is not possible to simply copy the updated elements from the exported XSL file to the original .style file. By copying the new code to the original file via the edited source window, Arbortext Editor will update the new code correctly, escaping the characters as required.