Main -> Documentation -> The WebZ Interface -> Formatting Your Display -> Procedure 4: Define or Modify the Rule Specification

Procedure 4: Define or Modify the Rule Specification

Along with a display specification, rule specifications are the essential structures inside a formatting configuration file that allow you to define or modify a format directly.

Creating a New Rule Specification

Perform the following steps to define a rule specification:

1. Open the desired formatting configuration file using your text editor.

Example: #MyFormats.ini

2. Scroll down to the desired area in the formatting configuration file where you want to add your new rule specification and use your text editor to type the definition.

3. Within square brackets, type the desired name of the new rule specification.

Example: [brieftitlebfst]

4. Type class= and a value equal to the name of a formatting rule (java class).

Example: class = ORG.oclc.fmts.rules.AddSaveButton

5. Type additional parameters and their values as needed for any formatting rule that may use them.

Example:

[bookmarkFromBriefbfst]
class = ORG.oclc.fmts.rules.AddSaveButton

nextpage = &StyleTable.pages.bookMarkFromBrief;

6. Define a rule specification for each rule listed in a display specification.

Example:

rule* = recordnumberbfst

[recordnumberbfst]
class = ORG.oclc.fmts.rules.AddRecordNumber

7. Save and exit the formatting configuration file when you are finished.

Helpful Hints: When defining a new formatting configuration file, the recommended method is to copy and then modify an existing file that contains most of the desired structures in it. Another alternative is for you to create a new file and include another file in it using the #include command. Including a file allows you to use what you want from the included file, but override anything that you do not want by defining it in the new file.


Modify a Rule Specification

Perform the following steps to modify an existing rule specification.

1. Open the desired formatting configuration file using your text editor.
Example:

#
#MarArticleRules.ini
#These are the different field elements that
#can be displayed

2. Scroll down to the section in the formatting configuration file containing the rule specification that you want to modify and use your text editor to insert, change, or delete the desired text.

3. Repeat Step 2 for as many rule specifications that you need to modify.
4. Save and exit the formatting configuration file when you are finished.
 
Note: A field specification is a parameter value recognized by some formatting rules (Java classes). You may need to define a field specification, depending on the formatting rule that you are using to handle the data for a specific element in a display. (See Formatting Specifications for more information about the structure and syntax of a field specification.)


See Also

Formatting Your Display
Design the Format
Locate the Affected Display Formatting Configuration Files
Display Formatting Configuration Files


[Main][Documentation][Support][Technical Reference][Community][Glossary][Search]

Last Modified: