PURPOSE
This document provides a list of procedures and functions available in the
Oracle WebServer Developers Toolkit.
SCOPE & APPLICATION
The information in this document targets general Oracle WebServer users.
1. Print Procedures
The following print procedures are used in conjunction with hypertext
functions (HTF) to generate a line in the HTML document being
constructed. They can also be passed hard-coded text that will
appear in the HTML document as is. The generated line is passed
to the Web Agent which sends it to standard output. As
documented in the CGI 1.1 specification, the Oracle Web
Listener takes the contents of standard output and returns it
to the Web browser that requested the dynamic HTML document.
htp.print : Generates a line in an HTML document.
htp.p : Alias for htp.print. Similar to
htp.print, but does not put a new line
at the end of the submitted value.
htp.prn : Similar to htp.print, but does not put
a new line at the end of the value submitted.
htp.prints : Generates a line in an HTML document
and replaces all occurrences of the following
special characters with escape characters. If
not replaced,the special characters would be
interpreted as HTML control characters,
and would produce garbled output.
htp.ps : Alias for htp.prints
2. Structure Tags
The following tags are used to identify the major parts of an
HTML document.
Note: Although this section shows hypertext procedures (HTP),
all of them are also available as hypertext functions
(HTF).
htp.htmlOpen : Prints a tag that indicates the
beginning of an HTML document.
htp.htmlClose : Prints a tag that indicates the
end of an HTML document.
htp.headOpen : Prints a tag that indicates the
end of an HTML document.
htp.headClose : Prints a tag that indicates the
end of the HTML document head.
htp.bodyOpen : Prints the tag that identifies
the beginning of the body of an HTML
document, and allows you to specify an
image as the background of the document.
htp.bodyClose : Defines the end of the HTML
document body.
3. Head Related Tags
The following procedure tags should be placed between the
htp.headOpen and htp.headClose procedure tags.
Note: Although this section shows hypertext procedures (HTP),
all of them are also available as hypertext functions
(HTF).
htp.title : Prints an HTML tag with the text you
pass in as the value of TITLE. Most Web
browsers display the text value enclosed
between <TITLE> and </TITLE> at the top of
the document viewing window.
htp.htitle : Prints the HTML tags for both the
title and a top heading using the title
you specify.
htp.base : Prints an HTML tag that records the
URL of the document.
htp.isindex : Creates a single entry field with a
prompting text, such as "enter value," then
sends that value to the URL of the page or
program.
htp.linkRel : Prints the HTML tag that gives the
relationship described by the hypertext
link from the anchor to the target. This
is only used when the HREF attribute is
present. This tag indicates a relationship
between documents, but does not create a
link. To do that, use htp.anchor.
htp.linkRev : Gives the relationship described by
the hypertext link from the target to the
anchor. This is the opposite of htp.linkRel.
This tag indicates a relationship between
documents, but does not create a link.
To do that, use htp.anchor.
htp.meta : Prints an HTML tag that identifies and embeds
document meta-information that supplies the
Web browser with information about the
objects returned in HTTP.
4. Body Tags
Body tags are used in the main text of your HTML page. They can
format a paragraph, allow you to add hidden comments to your
text, and add images within the body of your HTML text.
Note: Although this section shows hypertext procedures (HTP),
all of them are also available as hypertext functions
(HTF).
htp.line : Prints the HTML tag that generates a
line in the HTML document. csrc enables you
to specify a custom image as the source of
the line.
htp.hr : Alias for htp.line.
htp.nl : Prints the HTML tag that inserts a
new line.
htp.br : Alias for htp.nl.
htp.header : Prints the HTML tag for a heading
level, with the value of the heading level
assigned in the nsize parameter. Valid
levels are 1 through 6.
htp.anchor : Prints the HTML tag for an anchor
to be the start or end destination of a
hypertext link. This anchor can accept
several attributes, but either HREF or
NAME is required. HREF specifies where to
link to. NAME allows this tag to be a
target of a hypertext link.
htp.mailto : Prints the HTML tag for an anchor
with 'mailto' concatenated ahead of the
mail address argument.
htp.img : Prints an HTML tag that signals
the browser to load an image to be placed
into the HTML page. ALT allows you to
specify alternate text to be shown while
the image is being loaded, or instead of
the image if the browser does not support
images. The ISMAP attribute indicates that
the image is an image map.
htp.para : Prints an HTML tag that indicates
that the text previous to it should be
formatted as a paragraph.
htp.paragraph : Prints the same HTML tag as htp.para
except that parameters pass in exact
alignment, leading, wrapping, and
attributes.
htp.address : Prints an HTML tag that enables you
to specify address, author and signature
of document.
htp.comment : Prints an HTML tag that allows you to
store comments or lines in HTML pages. These
comments are not visible to the end user.
htp.preOpen : Prints an HTML tag that indicates the
beginning of preformatted text in the body of
the HTML page.
htp.preClose : Prints an HTML tag that ends the
preformatted section of text.
htp.blockquoteOpen : Prints an HTML tag that precedes
a paragraph of quoted text.
htp.blockquoteClose : Ends the <BLOCKQUOTE> section
of quoted text.
5. List Tags
List tags allow you to display information in any
of the following ways:
* ordered : these lists have numbered items.
* unordered : these lists have bullets to mark each item.
* definition : these lists alternate a term with its
definition.
Note: All the hypertext procedures (HTP) shown in this section
are also available as hypertext functions (HTF).
htp.listHeader : Prints an HTML tag at the beginning
of the list.
htp.listItem : Prints an HTML tag that formats a
listed item.
htp.ulistOpen : Prints an HTML tag that is used to
open an unordered list that presents listed
items separated by white space and marked
off by bullets.
htp.ulistClose : Prints an HTML tag that ends the
unordered list.
htp.olistOpen : Prints an HTML tag that is used
to open an ordered list that presents
listed items marked off with numbers.
htp.olistClose : Prints an HTML tag that ends an
ordered list.
htp.dlistOpen : Prints an HTML tag that starts a
definition list.
htp.dlistClose : Prints an HTML tag that ends a
definition list.
htp.dlistDef : Prints an HTML tag that is used
to insert terms, and their corresponding
definitions in an indented list format.
The htp.dlistTerm must immediately follow
this tag.
htp.dlistTerm : Prints an HTML tag used to insert
the definition term inside the definition
list. This tag must immediately follow the
htp.dlistDef.
htp.menulistOpen: Prints an HTML tag that begins a
list that presents one line per item,
and appears more compact than an
unordered list. The htp.listItem will
follow this tag.
htp.menulistClose: Prints an HTML tag that ends a
menu list.
htp.dirlistOpen : Prints an HTML tag that begins a
directory list. This presents information
in a list of items that contain up to
20 characters. Items in this list are
typically arranged in columns, typically
24 characters wide. The <LI> or
htp.listItem must appear directly after you
use this tag.
htp.dirlistClose: Prints an HTML tag that closes the
directory list tag, htp.dirlistOpen.
6. Character Format Tags
The character format tags are used to specify or alter the
appearance of the marked text. Character format tags have
opening and closing elements, and affect only the text
that they surround.
Character format tags give hints to the browser as to how
a character or character string should appear, but each
browser determines its actual appearance. Essentially,
they place text into categories such that all text in a
given category is given the same special treatment, but
the browser determines what that treatment is. For example,
the HTML string <STRONG>Here is some text</STRONG> might
appear as bold in some browsers, or might flash instead.
If a specific text attribute, such as bold is desired,
a physical format tag might be necessary. See the section,
"Physical Format Tags," for more information.
Note: All the hypertext procedures (HTP) shown in this section
are also available as hypertext functions (HTF).
htp.cite : Prints a pair of HTML tags that
specify the text they surround as a
citation. Usually rendered as italics.
htp.code : Prints a pair of HTML tags that
specify the text they surround as an
example of code output. Usually rendered
in monospace format, e.g. Courier.
htp.emphasis : Prints a pair of HTML tags that
specify the text they surround as
requiring typographic emphasis. This
tag is equivalent to htp.em. Usually
rendered as italics.
htp.em : Alias for htp.emphasis
htp.keyboard : Prints a pair of HTML tags that
specify the text they surround as text
typed in by the user, which is usually
rendered as monospace. This tag is
equivalent to htp.kbd.
htp.kbd : Alias for htp.keyboard
htp.sample : Prints a pair of HTML tags that
specify the text they surround as a
sequence of literal characters that must
be typed in the exact sequence in which
they appear. Usually rendered as
monospace font.
htp.strong : Prints a pair of HTML tags that
specify the text they surround as needing
strong typographic emphasis. Usually
rendered as bold.
htp.variable : Prints a pair of HTML tags that
specify the text they surround as a
variable name, or a variable that might
be entered by the user. Usually rendered
as italics.7. Physical Format Tags The
physical format tags are used to specify
the format of the marked text.
Note: All the hypertext procedures (HTP) shown in this
section are also available as hypertext functions
(HTF).
htp.bold : Prints a pair of HTML tags that
specify the text they surround is to be
rendered as boldface.
htp.italic : Prints a pair of HTML tags that
specify the text they surround is to be
rendered as italics.
htp.teletype : Prints a pair of HTML tags that
specify the text they surround is to be
rendered in a fixed width typewriter
font, e.g. Courier.
7. Form Tags
The form tags are used to create and manipulate an HTML form.
Forms are used to allow interactive data exchange between
a Web Browser and a CGI program. Forms can have the following
types of elements:
* Input: used for a large variety of types of input fields,
for example:
- single line text
- single line password fields
- checkboxes
- radio buttons
- submit buttons
- Text area: used to create a multi-line input field.
- Select: used to allow the user to chose one or more
of a set of alternatives described by
textual labels. Usually rendered as a
pull-down, popup, or a fixed size list.
Note: All the hypertext procedures (HTP) shown in this section
are also available as hypertext functions (HTF).
htp.formOpen : Prints an HTML tag that
starts the form. The curl value is
required and is the URL of the CGI
script, normally owa, to which the
contents of the Form will be sent.
The method is either "GET" or "POST."
htp.formClose : Prints an HTML tag that
closes the <FORM> tag.
htp.formCheckbox : Prints an HTML tag that
inserts a checkbox which the user
can toggle off or on.
htp.formHidden : Prints an HTML tag that
sends the content of a field
along with a submitted form.
The field is not visible to the
end user.
htp.formImage : Prints an HTML tag that
creates an image field that can
be clicked on causing the Form to
be immediately submitted. The
coordinates of the selected point
are measured in pixels, and
returned (along with other contents
of the form) in two name/value pairs.
The x-coordinate is submitted under
the name of the field with ".x"
appended, and the y-coordinate with
the ".y" appended. Any value
attribute is ignored. The image
itself is specified by the CSRC
attribute.
htp.formPassword : Prints an HTML tag that
creates a single line text entry
field. Text will not be displayed
as it is entered. When the user
enters a password, characters are
represented by asterisks on single
line text entry field.
htp.formRadio : Prints an HTML tag that
inserts a radio button on the
HTML Form. Used to create a set
of radio buttons, each
representing a different value,
only one of which will be
toggled on by the user. Each
radio button field should have
the same name. Only the selected
radio button will generate a
name/value pair in submitted data
area. This will require an
explicit VALUE attribute.
htp.formReset : Prints an HTML tag that
creates a RESET button that,
when selected, resets all the
form fields to their initial
values.
htp.formSubmit : Prints an HTML tag that
creates a button that, when
selected, submits the form. If
a SUBMIT button is selected to
submit the Form, and that button
has a name attribute specified,
the submit button then contributes
a name/value pair to the submitted
data.
htp.formText : Prints an HTML tag that
creates a field for a single
line of text.
htp.formSelectOpen : Prints an HTML tag that
begins a Select list of
alternatives. Contains the
attribute NAME which specifies
the name that will be submitted
as a name/value pair.
htp.formSelectOption : Prints an HTML tag that
represents one choice in the
Select element.
htp.formSelectClose : Prints an HTML tag that
ends a Select list of alternatives.
htp.formTextarea : Prints an HTML tag that
creates a text field that has no
predefined text in the text area.
Used to enable the user to enter
several lines of text.
htp.formTextareaOpen : Prints an HTML tag that
opens a text area where you can
insert predefined text that will
always appear in the text field.
htp.formTextareaClose : Prints an HTML tag that
ends TextArea field
8. Table Tags
The Table tags allow the user to insert tables and manipulate
the size and columns of the table in a document.
Note: All the hypertext procedures (HTP) shown in this section
are also available as hypertext functions (HTF).
htp.tableOpen : Prints an HTML tag that
begins an HTML table.
htp.tableClose : Prints an HTML tag that
ends an HTML table.
htp.tableCaption : Prints an HTML tag that
places a caption in the inserted
table.
htp.tableRowOpen : Prints an HTML tag that
inserts a row tag into a table.
htp.tableRowClose : Prints an HTML tag that
ends a row in a table.
htp.tableHeader : Prints an HTML tag that
inserts a table header.
htp.tableData : Prints an HTML tag that
inserts data into the rows and
columns of a selected table.
9. OWA_UTIL PackageThe OWA_UTIL Package is a set of useful
utility procedures built on top of hypertext functions
and hypertext procedures.
owa_util.signature : Prints an HTML line
followed by a signature line
on the HTML document.
owa_util.signature (cname) : Allows the programmer
to create a signature line on
the bottom of the HTML
document that has a hypertext
link to view the PL/SQL
source for that procedure.
owa_util.showsource (cname) : Prints the source of
the specified PL/SQL
procedure, function, or
Package. If a procedure or
function which belongs to a
package is specified, then
the entire package is
displayed.
owa_util.showpage : This procedure allows
a user to view the HTML
output of a PL/SQL procedure
call from SQL*Plus, SQL*DBA,
or Oracle Server Manager.
The PL/SQL procedure must
use HTP and/or HTF to
generate the HTML page,
and owa_util.showpage must
be issued after the PL/SQL
procedure has been called
and before any other HTP
or HTF subprograms are
directly or indirectly
called. This method is
useful for generating pages
filled with static data.
Note that this procedure uses
dbms_output and thus is
limited to 255 characters per
line and an overall buffer
size of 1,000,000 bytes.
owa_util.get_cgi_env(function) : Allows programmer to
retrieve the value of the
specified CGI environment
variable in the PL/SQL
procedure.
owa_util.print_cgi_env : Enables programmer to
print all of the CGI
environment variables made
available by the Web Agent to
the PL/SQL procedures. This
utility is good for testing
purposes.
owa_util.mime_header : Enables programmer to
change the default MIME
header that the Web Agent
returns. This must come
before any htp.print or
htp.prn calls in order to
signal the Web Agent not to
use the default.
owa_util.get_owa_service_path(Function) : Returns the
name of the currently
active path with its full
virtual path, plus the
currently active service. For
example, a call to
get_owa_service_path could
return /ows-bin/myservice/owa/.
owa_util.tableprint : Enables programmers
to print Oracle tables as
either preformatted or HTML
tables, depending upon Web
browser capabilities.
Note that RAW COLUMNS are
supported, however LONG RAW
are not. References to
LONG RAW columns will print
the result 'Not Printable'.
In this case, cattributes
is the second, rather than
the last, parameter.
Customized Extensions to HTP Packages : The design of the
hypertext procedure and
function packages allows you
to use customized extensions.
Therefore, as the HTML
standard changes, you can
add new functionality similar
to the hypertext procedure
and function packages to
reflect those changes.
Copyright 1995 Oracle Corporation 500 Oracle Parkway,
Redwood City, CA 94065.
.