The "Policy Manual" for the JafSoft text conversion utilities

The most recent version of this document can always be found online


Previous page Back to Contents List Next page

2 Policy Name, values and scope

2.1 Policy Names and descriptions

Each policy has a name, which also acts as a short description. This description is used in the policy files, and must be matched exactly in the policy file if the policy is to be recognised. This means that if the policy text is misspelt, then you must normally match the misspelling.

However there is an exception to this rule...


2.1.1 British and American spellings of Colour

Although the program is developed by a British Author, as far as possible I've tried to support use of British and American English in the policy names.

So, for example, the word "colour" may usually be spelt "color" in the following policies :-

2.2 Policy values

Each policy has a data value. The type of values a policy can take will vary from policy to policy.

For most policies the special value "(none)" will be accepted, meaning that this policy should be ignored and/or assigned a suitable default value.


2.2.1 Yes/No values

The commonest type of data value is simple a "Yes/No" value. That is the value is either "Yes" or "no". In practice only the first letter is required.

For backwards compatibility the values "true" and "false" may also be used.


2.2.2 Numerical values

Many policy values require numeric values. Sometimes the value will be constrained, e.g. must be positive, or it must lie within a certain range. Values that lie outside the accepted range will be reported in error, and the policy will be ignored.


2.2.3 Text strings

Many policies are simple text strings, e.g. the Title of the HTML pages being produced. In such cases the whole value will be used, but any spaces before or after the value will be ignored.


2.2.4 HTML colours

Some policies accept colour values. These values should be HTML colours which - for example - may be placed in the various attributes of the <BODY> tag.

You can enter any value acceptable to HTML. Normally a value is expressed as a 6-digit hexadecimal value in the range 000000 (black) to FFFFFF (white), but certain colours such as "white", "blue", "red" etc may also be recognised by HTML. The program simply transcribes your value into the output file.

A value of "none" signals the defaults are to be used. By default AscToHTM changes the background colour to be white (the true HTML default is a light gray whose value is "C0C0C0").


2.2.5 Section/Heading levels

Some policies require section or heading level values. The program numbers heading levels as follows :-

Chapter headings 1
Major sections 2
sub-sections 3
sub-sub-sections 4


In a document with numbered sections "1" would be a chapter, "1.2" a major section, "1.2.3" a sub-section and "1.2.3.4" a sub-sub-section etc.

In documents with underlined sections the heading level is determined by the underlining character.

Chapters '*'
Major sections '+','=' or'/'
Sub-sections '-','_' or '~'
Sub-sub-sections '.'


2.2.6 Lists of names

A few policies require a list of named values. In such cases the values are either :-

2.3 Policy scope

Each policy has its own scope. Policies are scoped in two different ways:-

2.3.1 Dynamic analysis policy

Dynamic analysis policies are policies that affect the analysis of the file, that may be varied during the processing of the file. This is achieved by embedding new values in the file itself (see 3.4)

For example adding the line(s)

        $_$_CHANGE_POLICY Look for short lines : no
        ...
        $_$_CHANGE_POLICY Look for short lines : yes

uses the policy look for short lines to prevent the software looking for short lines for the enclosed part of the document.


2.3.2 Dynamic output policy

Dynamic output policies are policies that affect the generation of the output file(s) that may be varied during the processing of the file. This is achieved by embedding new values in the file itself (see 3.4)

For example adding the lines

        uk.railways
        $_$_CHANGE_POLICY Recognised USENET groups : uk
        uk.railways
        $_$_CHANGE_POLICY Recognised USENET groups : (none)

to your source uses the policy Recognised USENET groups to switch on the recognition of "uk.railways" as a newsgroup for a few lines, where this is normally disabled by default.


2.3.3 Fixed analysis policy

Fixed analysis policies are policies that affect the analysis of the file, and that may not be varied during the processing of the file, usually because what they describe should apply to the whole file.

For example the indentation pattern used in the file is usually fixed in this way.


2.3.4 Fixed output policy

Fixed output policies are policies that affect the generation of the output file, and that may not be varied during the processing of the file, usually because they must be consistent, or because they're output near the top of the document.

For example the Active Link Colour is put in the <HEAD> portion of the HTML file, and cannot be varied throughout the file.



Previous page Back to Contents List Next page

Valid HTML 4.0! Converted from a single text file by AscToHTM
© 1997-2004 John A. Fotheringham
Converted by AscToHTM