xml spy
Previous  Top  Next
Text State icons

The "Text State icons" command allows you to define an icon for each global element (that can contain text) present in the schema. A global element is one that appears under the "Global Templates" element in the schema tree view. You have total freedom to apply any styles, formatting etc. to XML documents using this command.

glob_elem_overview  

Defining text state icons

1.Make sure the element type you want to define as an icon is available as a global element in the schema (italic). The entry will be visible under Global Templates in the schema tree view in XSLT Designer.  
2.Click the italic element under Global Templates, and define the attributes you want it to have in the HTML attributes window e.g. font-style = italic.  
3.Select the menu option Document Editor | Text State Icons.  
glob_txt_state_icons2  
This opens the "Text State Icons" dialog box.  
4.Click the "+" button to add a new line.  
5.Click the combo box that is made available at this point.  
The drop down list contains all the elements that can contain text in the Global Templates list.  

glob_txt_state_icons3  

6.Click the italic entry and confirm with Enter.  
7.Double click in the icon name column, and enter the name of the icon that should represent the attribute e.g. italic.bmp, in the Document Editor toolbar.  

glob_txt_state_icons4  

8.Click OK to confirm.  

Making Text state icons available to Document Editor

1.Design the icon you want to represent "italic" in your graphic program (as a windows .BMP), and give it the same name as entered in the Text State Icon dialog box (italic.bmp)  
2.Place the italic.bmp in the installation folder of XML Spy which is your installation folder +...+\Altova\XML Spy Suite\sps\Picts.  
3.Start XML Spy Document Editor and open or create a new template file (*.sps).  
The italic.bmp icon you defined is now visible in a toolbar.  
4.Mark some text in the Document Editor and click the italic icon to apply the formatting.  

Previous  Top  Next

⌐ 2002 Altova