Purpose
Defines how a Web page is to be presented. The name of the HTML
block to be executed is specified on the URL when Net.Data is
invoked. The HTML block can contain most Net.Data macro language
statements and any valid presentation statements, such as HTML and
Javascript.
Syntax
.--------------------------.
V |
>>-%HTML----(--name--)----{-----+--------------------+--+---%}--><
+-variable reference-+
+-if block-----------+
+-function call------+
+-HTML statement-----+
+-include statement--+
'-while block--------'
Values
- %HTML
- The keyword that specifies the block that contains HTML tags and text to
be displayed on the client's browser.
- name
- An alphabetic or numeric string that begins with an alphabetic character
or underscore and contains any combination of alphabetic, numeric, or
underscore characters, including periods.
- variable reference
- Returns the value of a variable and is specified with $ and (). For
example: if VAR='abc', then $(VAR) returns
the value 'abc'. See Variable Reference for syntax information.
- if block
- The IF block. Performs conditional string processing. String
values in the condition list are treated as numeric for comparisons if they
are strings that represent integers and have no leading or trailing white
space. They can have a single leading plus (+) or minus (-)
sign. See IF Block for syntax and examples.
- function call
- Invokes one or more FUNCTION or MACRO_FUNCTION blocks, or a
Net.Data built-in function with specified arguments. See Function Call (@) for syntax and examples.
- HTML statements
- Includes any alphabetic or numeric characters, as well as HTML tags to be
formatted for the client's browser.
- include statement
- The INCLUDE statement. Reads and incorporates a file into the
Net.Data macro. See INCLUDE Statement for syntax and examples.
- while block
- The WHILE block. Performs looping with conditional string
processing. See WHILE Block for syntax and examples.
Context
The HTML block can be found in these contexts:
- IF block
- Outside of any block in the declaration part of the Net.Data macro
Restrictions
The HTML block can contain these elements:
- Comment block
- IF block
- HTML statements
- INCLUDE statement
- WHILE block
- Variable references
- Function calls
Examples
Example 1: HTML block with include files for headings and
footings
%HTML(example1){
%INCLUDE "header.html"
<p>You can put <em>any</em> HTML in an HTML block.
An SQL function call is made like this:
@xmp1()
%INCLUDE "footer.html"
%}
Example 2: HTML block with a name that contains a period
%HTML(my.report){
%INCLUDE "header.html"
<p>You can put <em>any</em> HTML in an HTML block.
An SQL function call is made like this:
@xmp1()
%INCLUDE "footer.html"
%}
[ Top of Page | Previous Page | Next Page | Index ]