>22 2 : Policy Name, values and scope  A 
F

The "Policy Manual" for the JafSoft text conversion utilities

DThis documentation can be downloaded as part of the Ldocumentation set in .zip format



\ Previous page $F Back to Contents List#X Next page 


 (

2 Policy Name, values and scope

 *

2.1 Policy Names and descriptions

H

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

4

However there is an exception to this rule...


 7

2.1.1 British and American spellings of Colour

L

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

I

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


 

2.2 Policy values

P

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

N

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


 

2.2.1 Yes/No values

L

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

R

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


 

2.2.2 Numerical values

J

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


 

2.2.3 Text strings

P

Many policies are simple text strings, e.g. the Title of the HTML pages beingLproduced. 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

K

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

P

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

E

A value of "none" signals the defaults are to be used. By defaultLAscToHTM 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

N

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

1M

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

H

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

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


 

2.2.6 Lists of names

O

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

 

2.3 Policy scope

R

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


 &

2.3.1 Dynamic analysis policy



LDynamic analysis policies are policies that affect the analysis of the file,Jthat 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)

*
3        $_$_CHANGE_POLICY Look for short lines : no        ...4        $_$_CHANGE_POLICY Look for short lines : yes
1





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






 $

2.3.2 Dynamic output policy



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



For example adding the lines

*
        uk.railways7        $_$_CHANGE_POLICY Recognised USENET groups : uk2        uk.railways;        $_$_CHANGE_POLICY Recognised USENET groups : (none)
1

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


 $

2.3.3 Fixed analysis policy

M

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

P

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


 "

2.3.4 Fixed output policy

N

Fixed output policies are policies that affect the generation of the outputKfile, and that may not be varied during the processing of the file, usuallyGbecause they must be consistent, or because they're output near the topof 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.


 2


\ Previous page $F Back to Contents List#X Next page 


B> 
Valid HTML 4.0!Converted from a single text file by HREF="http://www.jafsoft.com/asctohtm/">AscToHTM
K© 1997-2000 John A. Fotheringham