CSE HTML Validator Standard/Professional v6.01 Documentation

[ Home | Download | Order | Support ]

[ Table of Contents ]

Configuration Program Editor

This editor is available from the Programs tab of the Configuration Editor.

The Programs tab in the Configuration Editor allows you to view and edit the tag name programs that are associated with the currently selected tag name being configured. The program for a tag name is executed each time the tag name is used (or closed) in a document that is being validated. These programs are also called tag name programs because they are generally run when a certain tag name is encountered in a document that is being validated.

Radio Button

Options

The Tag Name Program Programming Language

Quick jump to function:

General Information

Variable/Symbol Names

$name=string exp value;

Creates a variable called name (if it doesn't already exist), and sets its value to value. The return value is value and is a string.

#name=int exp value;

Creates a variable called name (if it doesn't already exist), and sets its value to value. The return value is value and is an integer.

Data Types

Flow Control

do { statement; ... } while (int exp);

Executes a statement or statement block while the integer expression is true (nonzero). The statement or statement block is executed at least once.

if (int exp) { statement; ... } [else { statement; ... }]

Executes a statement block, depending on the value of the integer expression. Executes the statement block following if if the integer expression is nonzero, else executes the statement block following else if the integer expression is 0. The else part is optional.

for (statement1; int exp; statement2) { statement3; ... }

Executes statement1, then evaluates the integer expression. If the integer expression is nonzero, then statement3 is executed, otherwise control returns to the statement immediately following the block that contains statement3. If the statement3 block is executed, statement2 is executed immediately afterwards. The integer expression is then reevaluated and the loop continues until the integer expression evaluates to zero. statement1 and statement2 may be statement blocks.

For example, this loop continues while the integer expression is nonzero: execute statement1, evaluate integer expression, execute statement3 block, execute statement2, evaluate integer expression, execute statement3 block, execute statement2, evaluate integer expression, ...

while (int exp) { statement; ... }

Continues executing a statement block while the integer expression is true (nonzero).

Functions

Simple, user-defined functions are new to CSE HTML Validator Professional v4.0320 and later. To define a function, add a function to the functions program type in the following format (note that the keyword function must begin at the first character of a line):

function functionname() { statement; ... }

To call a function, use @functionname();.

Special Functions

Functions Returning Integers

int checkString(int exp flags, string exp string)

int checkStringEx(int exp flags, int exp mode, string exp string)

int checkVersion(float exp version)

int getAttIndex(string exp attribute)

int getNumAttributes()

int getStringStartIndex(string exp string1, string exp string2)

int getValueInt(int exp valueidentifier)

int hasEqual(int exp index)

int isCatActive(int exp category id)

int isDefined(string exp name)

int isFlagSet(int exp flag)

int isInRange(string exp tagname1[, string exp tagname2...])

int isValueInArray(string exp arrayname, string exp value[, int flags]);

int matchCase(string exp string, string exp str1[, string exp str2...])
int matchNoCase(string exp string, string exp str1[, string exp str2...])

int strcmp(string exp string1, string exp string2)
int stricmp(string exp string1, string exp string2)
int strncmp(string exp string1, string exp string2, int exp length)
int strnicmp(string exp string1, string exp string2, int exp length)

int strlen(string exp string)

Functions Returning Floats

float getValueFloat(int exp valueidentifier)

Functions Returning Strings

string convertString(int exp flags, string exp string)

string getAttName(int exp index)

string getAttValue(int exp index)

string getAttValueEx(int exp index, int exp flags)

string getMidString(string exp string, int exp startindex, int exp length)

string getTagName()

string getValueString(int exp valueidentifier)

string isInRangeEx(int exp flags, string exp tagname1[, string exp tagname2...])

string pluralize(string exp str, int num[, int mode)

string toLower(string exp string)

string toString(int exp convert)

string toStringF(float exp convert[, string format])

string toUpper(string exp string)

Functions Returning Locations

location getAttLocation(int exp index)

location getAttValueLocation(int exp index)

location getLocation(int exp locid, int exp auxint)

Procedures

activateCategory(int exp categoryid, int exp activate);

activateCategories(int exp activate[, int exp categoryid...]);

checkAttributes(int exp flags, string exp att1[, string exp att2...]);

checkStyle(int exp flags)

runLinkCheckProgramForTags(string exp tagname1[, string exp tagname2...])

setClosed(int exp id);

setValidated(int exp index, int exp what);

setValueString(int exp valueidentifier, string exp value)

setValueStringEx(int exp valueidentifier1, int exp valueidentifier2, int exp arg1, string exp value)

unDefine(string exp name1[, string exp name2...]);

Combination Functions and Procedures

int addValue(string exp name, string exp value[, int flags]);

int checkRange(int exp flags, int exp returntype, string exp isopentag, string exp tagname1[, string exp tagname2...]);

int checkRangeEx(int flags, string exp tagname1[, string exp tagname2...]);

int checkTagAttributes(int exp checktype, int exp flags[, any optional parametes])

int checkTagContents(int exp checktype, int exp flags, int exp msgid, string exp tagname1[, string exp tagname2...])

int checkTagUsed(int exp flags, int exp returntype, string exp isopentag[, string exp tagname1, string exp tagname2...]);

int Message(int exp display, int exp messagetype, string exp message[, location exp location]);

int MessageEx(int exp flags, int exp messagetype, string exp category, string exp message[, location exp location]);

int playSound(string exp filename[, int exp options])

int requireAllAttributes(int exp flags, string exp att1[, string exp att2...]);

int requireMutuallyExclusiveAttributes(int exp display, int exp returntype, string exp att1[, string exp att2...]);

int requireOneAttribute(int exp flags, int exp returntype, string exp att1[, string exp att2...]);

int runProgram(int exp programnum[, int exp programnum...])

int setFlag(int exp flagset, int exp flag, int exp value);

int setFlagEx(int exp flagset, int exp flag, int exp arg1, int exp value);

int setInt(string exp name, int exp value);

int setPriority(int priority)

int setValueInt(int exp valueidentifier, int exp value)

[ Table of Contents ]