|
Sybernet / Supplied Packages Reference
Release 3.00 August 23, 2003 |
|
The VALIDATOR package provides subprograms for creating trace files from your active Sybernet session. Although the package can capture all output, there is no facility for capturing user input. It uses the STDIO package to write your output to a standard unix disk file.
VALIDATOR defines the following global variables:
fildes int := -1; -- File descriptor errno int := 0; -- error number
| Subprogram | Description |
|---|---|
TRACE procedure |
Turns tracing on and off or writes buffer to the trace file. |
TRACING function |
Determines if tracing is on or off. |
UNLINK procedure |
Removes the trace file. |
VALIDATE procedure |
Validates the trace file. |
This overloaded procedure turns tracing on and off (Syntax 1) or writes your buffer to the trace file (Syntax 2).
HTTP.VALIDATOR.TRACE (STATE IN BOOLEAN);
| Parameter | Description |
|---|---|
state |
Turns tracing on (TRUE) and turns tracing off (FALSE). |
HTTP.VALIDATOR.TRACE (BUFFER IN VARCHAR2);
| Parameter | Description |
|---|---|
buffer |
Writes buffer to the trace file. |
The following block illustrates how to call HTTP.VALIDATOR.TRACE:
BEGIN
HTTP.VALIDATOR.TRACE(TRUE);
HTTP.VALIDATOR.TRACE('<html>');
HTTP.VALIDATOR.TRACE('</html>');
HTTP.VALIDATOR.TRACE(FALSE);
END;
This procedure runs the Sybernet Validator (a C program) against your trace file.
HTTP.VALIDATOR.VALIDATE (VERBOSE IN BOOLEAN,DOCTYPE IN VARCHAR2:=NULL)
| Parameter | Description |
|---|---|
verbose |
This option arms verbose (-v) flag when true. |
doctype |
This option arms the document type (-d) flag. |
The following block illustrates how to call HTTP.VALIDATOR.VALIDATE:
BEGIN
HTTP.VALIDATOR.TRACE(TRUE);
HTTP.VALIDATOR.TRACE('<html>');
HTTP.VALIDATOR.TRACE('</html>');
HTTP.VALIDATOR.TRACE(FALSE);
HTTP.VALIDATOR.VALIDATE(TRUE,'1');
END;
This procedure removes your trace file. Tracing is turned off (if on) before your trace file is discarded.
HTTP.VALIDATOR.UNLINK;
None.
The following block illustrates how to call HTTP.VALIDATOR.UNLINK:
BEGIN
HTTP.VALIDATOR.TRACE(TRUE);
HTTP.VALIDATOR.TRACE('<html>');
HTTP.VALIDATOR.TRACE('</html>');
HTTP.VALIDATOR.TRACE(FALSE);
HTTP.VALIDATOR.UNLINK;
END;
This function determines if tracing is on or off.
HTTP.VALIDATOR.TRACING RETURN BOOLEAN;
None.
The following block illustrates how to call HTTP.VALIDATOR.TRACING:
BEGIN
HTTP.SP_HTML_INPUT
(
TYPE => 'SUBMIT'
, NAME => 'SUBMIT'
, VALUE => 'Trace On'
, ONCLICK => 'TOGGLE(this.form,this);'
, DISABLED => HTTP.VALIDATOR.TRACING
) ;
END;