### Editing the XSD style files

In addition to editing the styles (style groups) in JReport Designer, you can also edit the XSD format styles (style groups) outside JReport Designer.

When you save a catalog, the style information is saved to disk at the same time. The related file will be located as below:

| File Name | File Description | Location
--- | --- | --- | ---
1. | CatalogName_stl.xml | Style Group Structure in the Catalog | Catalog Folder (The directory where the catalog resides)
2. | StyleGroupName_stl.xsd | Group/Style information | `<install_root>\style`

The CatalogName_stl.xml file keeps the style group structure information. The following shows an example:

The style group structure in Catalog Browser: | The corresponding information in SampleReports_stl.xml:
--- | ---
| `<?xml version="1.0" encoding="UTF-8"?> <StyleGroup> <StyleGroupname="Default"> </StyleGroup> <StyleGroup name="ClassicBlue"> </StyleGroup> <StyleGroup name="ClassicGreen"> </StyleGroup> </StyleGroup>`

The StyleGroupName_stl.xsd file keeps the group/style information, which in the above sample will be as follows:

The file content of ClassicBlue_stl.xsd:

As you can see in the above code sample, an XML style group file contains style group information, style information, and the style property entry information. You can edit the attributes of an element.

- To add a style entry, copy and paste the style information section, and then modify the attributes.
- To add a style property entry, copy and paste any element line, and then modify the attributes.
- To delete a style entry or style property entry, select the corresponding section, and delete it.
- To add a new style group, follow the steps below:
  1. Copy and paste an existing XML style group file.
  2. Rename it using the required name (Format: GroupName _stl.xsd).
  3. Change the default attribute in the GroupName element line using the required group name. Make sure that the name is the same as the group name specified in the XML style group file name.
  4. Add a new line for this group in the CatalogName_stl.xml file. For example, if the new group name is GroupA, you would then insert the following line to the file:

     `<StyleGroup name="GroupA"></StyleGroup>`

  5. Modify the XML style group file (GroupName_stl.xsd).
  6. Open the catalog in JReport Designer, and you can see the changes.

Notes:

- The value you type for the default attribute must be consistent with other attributes in the element, and is recognized by JReport Designer.

  For example, if you want to change the Font Face property, you must type a proper font name that JReport supports for the default attribute, such as Arial, Times New Roman, Tahoma, and so on. You cannot type strings that are not recognized by JReport. Otherwise, the element will not take effect at runtime.

- Make sure that the GroupName attribute is consistent with the XML style group file name.

  For example, with GroupA in the XML file, the GroupName attribute is:

  `<xs:attribute name="GroupName" type="xs:string" default="GroupA"></xs:attribute>`

  The XML style group file name should then be GroupA_stl.xsd.