Oracle9i Application Server PL/SQL Web Toolkit Reference Release 1.0.2.2 Part Number A90101-01 |
|
The htp (hypertext procedures) and htf (hypertext functions) packages generate HTML tags. For instance, the htp.anchor procedure generates the HTML anchor tag, <A>. The following commands generate a simple HTML document:
create or replace procedure hello AS BEGIN htp.htmlopen; -- generates <HTML> htp.headopen; -- generates <HEAD> htp.title('Hello'); -- generates <TITLE>Hello</TITLE> htp.headclose; -- generates </HEAD> htp.bodyopen; -- generates <BODY> htp.header(1, 'Hello'); -- generates <H1>Hello</H1> htp.bodyclose; -- generates </BODY> htp.htmlclose; -- generates </HTML> END;
For every htp procedure that generates HTML tags, there is a corresponding htf function with identical parameters. The function versions do not directly generate output in your web page. Instead, they pass their output as return values to the statements that invoked them. Use these functions when you need to nest calls. To look up htf functions, see the entry for the corresponding htp procedures.
To print the output of htf functions, call the functions from within the htp.print procedure. It then prints its parameters to the generated web page.
htp.htmlOpen, htp.htmlClose - generate <HTML> and </HTML>
htp.headOpen, htp.headClose - generate <HEAD> and </HEAD>
htp.bodyOpen, htp.bodyClose - generate <BODY> and </BODY>
htp.comment - generates <!-- and -->
htp.base - generates <BASE>
htp.linkRel - generates <LINK> with the REL attribute
htp.linkRev - generates <LINK> with the REV attribute
htp.title - generates <TITLE>
htp.meta - generates <META>
htp.script - generates <SCRIPT>
htp.style - generates <STYLE>
htp.isindex - generates <ISINDEX>
htp.appletopen, htp.appletclose - generate <APPLET> and </APPLET>
htp.param - generates <PARAM>
htp.olistOpen, htp.olistClose - generate <OL> and </OL>
htp.ulistOpen, htp.ulistClose - generate <UL> and </UL>
htp.dlistOpen, htp.dlistClose - generate <DL> and </DL>
htp.dlistTerm - generates <DT>
htp.dlistDef - generates <DD>
htp.dirlistOpen, htp.dirlistClose - generate <DIR> and </DIR>
htp.listHeader - generates <LH>
htp.listingOpen, htp.listingClose - generate <LISTING> and </LISTING>
htp.menulistOpen, htp.menulistClose - generate <MENU> and </MENU>
htp.listItem - generates <LI>
htp.formOpen, htp.formClose - generate <FORM> and </FORM>
htp.formCheckbox - generates <INPUT TYPE="CHECKBOX">
htp.formHidden - generates <INPUT TYPE="HIDDEN">
htp.formImage - generates <INPUT TYPE="IMAGE">
htp.formPassword - generates <INPUT TYPE="PASSWORD">
htp.formRadio - generates <INPUT TYPE="RADIO">
htp.formSelectOpen, htp.formSelectClose - generate <SELECT> and </SELECT>
htp.formSelectOption - generates <OPTION>
htp.formText - generates <INPUT TYPE="TEXT">
htp.formTextarea, htp.formTextarea2 - generate <TEXTAREA>
htp.formTextareaOpen, htp.formTextareaOpen2, htp.formTextareaClose - generate <TEXTAREA> and </TEXTAREA>
htp.formReset - generates <INPUT TYPE="RESET">
htp.formSubmit - generates <INPUT TYPE="SUBMIT">
htp.tableOpen, htp.tableClose - generate <TABLE> and </TABLE>
htp.tableCaption - generates <CAPTION>
htp.tableRowOpen, htp.tableRowClose - generate <TR> and </TR>
htp.tableHeader - generates <TH>
htp.tableData - generates <TD>
htf.format_cell - generates <TD>
htp.line, htp.hr - generate <HR>
htp.img, htp.img2 - generate <IMG>
htp.anchor, htp.anchor2 - generates <A>
htp.mapOpen, htp.mapClose - generate <MAP> and </MAP>
htp.header - generates heading tags (<H1> to <H6>)
htp.para, htp.paragraph - generate <P>
htp.print, htp.prn - generate any text that is passed in
htp.prints, htp.ps - generate any text that is passed in; special characters in HTML are escaped
htp.preOpen, htp.preClose - generate <PRE> and </PRE>
htp.blockquoteOpen, htp.blockquoteClose - generate <BLOCKQUOTE> and </BLOCKQUOTE>
htp.div - generates <DIV>
htp.nl, htp.br - generate <BR>
htp.nobr - generates <NOBR>
htp.wbr - generates <WBR>
htp.plaintext - generates <PLAINTEXT>
htp.address - generates <ADDRESS>
htp.mailto - generates <A> with the MAILTO attribute
htp.area - generates <AREA>
htp.bgsound - generates <BGSOUND>
htp.basefont - generates <BASEFONT>
htp.big - generates <BIG>
htp.bold - generates <B>
htp.center - generates <CENTER> and </CENTER>
htp.centerOpen, htp.centerClose - generate <CENTER> and </CENTER>
htp.cite - generates <CITE>
htp.code - generates <CODE>
htp.dfn - generates <DFN>
htp.get_download_files_list - generate <EM>
htp.fontOpen, htp.fontClose - generate <FONT> and </FONT>
htp.italic - generates <I>
htp.keyboard, htp.kbd - generate <KBD> and </KBD>
htp.s - generates <S>
htp.sample - generates <SAMP>
htp.small - generates <SMALL>
htp.strike - generates <STRIKE>
htp.strong - generates <STRONG>
htp.sub - generates <SUB>
htp.sup - generates <SUP>
htp.teletype - generates <TT>
htp.underline - generates <U>
htp.variable - generates <VAR>
htp.frame - generates <FRAME>
htp.framesetOpen, htp.framesetClose - generate <FRAMESET> and </FRAMESET>
htp.noframesOpen, htp.noframesClose - generate <NOFRAMES> and </NOFRAMES>
This generates the <ADDRESS> and </ADDRESS> tags, which specify the address, author and signature of a document.
These generate the <A> and </A> HTML tags, which specify the source or destination of a hypertext link. This tag accepts several attributes, but either HREF or NAME is required. HREF specifies to where to link. NAME allows this tag to be a target of a hypertext link. The difference between these subprograms is that htp.anchor2 provides a target and therefore can be used for a frame.
htp.appletopen generates the <APPLET> HTML tag, which begins the invocation of a Java applet. Close the applet invocation with htp.appletclose, which generates the </APPLET> HTML tag.
Specify parameters to the Java applet using the htp.param procedure.
Use the cattributes parameter to specify the CODEBASE attribute since the PL/SQL cartridge does not know where to find the class files. The CODEBASE attribute specifies the virtual path containing the class files.
This generates the <AREA> HTML tag, which defines a client-side image map. The <AREA> tag defines areas within the image and destinations for the areas.
This generates the <BASE> HTML tag, which records the URL of the document.
This generates the <BASEFONT> HTML tag, which specifies the base font size for a Web page.
Properties | Definitions |
---|---|
Syntax: |
htp.basefont(nsize in integer); htf.basefont(nsize) return varchar2; |
Parameters: |
nsize - the value for the SIZE attribute. |
Generates: |
<BASEFONT SIZE="nsize"> |
This generates the <BGSOUND> HTML tag, which includes audio for a Web page.
This generates the <BIG> and </BIG> tags, which direct the browser to render the text in a bigger font.
This generates the <BLOCKQUOTE> and </BLOCKQUOTE> tag, which mark a section of quoted text.
This generates the <BODY> and </BODY> tags, which mark the body section of an HTML document.
This generates the <B> and </B> tags, which direct the browser to display the text in boldface.
This generates the <CENTER> and </CENTER> tags, which center a section of text within a Web page.
Properties | Definitions |
---|---|
Syntax: |
htp.center(ctext in varchar2); htf.center(ctext in varchar2) return varchar2; |
Parameters: |
ctext - the text to center. |
Generates: |
<CENTER>ctext</CENTER> |
This generates the <CENTER> and </CENTER> tags, which mark the section of text to center.
Properties | Definitions |
---|---|
Syntax: |
htp.centerOpen; htf.centerOpen return varchar2; htp.centerClose; htf.centerClose return varchar2; |
Parameters: |
None |
Generates: |
</CENTER> |
This generates the <CITE> and </CITE> tags, which direct the browser to render the text as citation.
This generates the <CODE> and </CODE> tags, which direct the browser to render the text in monospace font.
This generates the comment tags.
Properties | Definitions |
---|---|
Syntax: |
htp.comment (ctext in varchar2); htf.comment (ctext in varchar2) return varchar2; |
Parameters: |
ctext - the comment. |
Generates: |
<!-- ctext --> |
This generates the <DFN> and </DFN> tags, which direct the browser to render the text in italics.
Properties | Definitions |
---|---|
Syntax: |
htp.dfn(ctext in varchar2); htf.dfn(ctext in varchar2) return varchar2; |
Parameters: |
ctext - the text to render in italics. |
Generates: |
<DFN>ctext</DFN> |
This generates the <DIR> and </DIR> tags, which create a directory list section. A directory list presents a list of items that contains up to 20 characters. Items in this list are typically arranged in columns, 24 characters wide. The <LI> tag or htp.listItem must appear directly after this tag to define the items in the list.
Properties | Definitions |
---|---|
Syntax: |
htp.dirlistOpen; htf.dirlistOpen return varchar2; htp.dirlistClose; htf.dirlistClose return varchar2; |
Parameters: |
None |
Generates: |
</DIR> |
This generates the <DIV> tag, which creates document divisions.
This generates the <DL> and </DL> tags, which create a definition list. A definition list looks like a glossary: it contains terms and definitions. Terms are inserted using htp.dlistTerm, and definitions are inserted using htp.dlistDef.
This generates the <DD> tag, which inserts definitions of terms. Use this tag for a definition list <DL>. Terms are tagged <DT> and definitions are tagged <DD>.
This generates the <DT> tag, which defines a term in a definition list <DL>.
After uploading files to the database, you can download them, delete them from the database, and read and write their attributes.
After you have downloaded files to the database, you need to get the files.
This generates the <EM> and </EM> tags, which define text to be emphasized.
This replaces characters that have special meaning in HTML with their escape sequences. The following characters are converted:
The procedure version of this subprogram does the same thing as htp.prints and htp.ps.
Properties | Definitions |
---|---|
Syntax: |
htf.escape_sc(ctext in varchar2) return varchar2; htp.escape_sc(ctext in varchar2); |
Parameters: |
ctext - the string to convert. |
Generates: |
The converted string. |
This replaces characters that have special meaning in HTML and HTTP with their escape sequences. The following characters are converted:
Properties | Definitions |
---|---|
Syntax: |
htf.escape_url(p_url in varchar2) return varchar2; |
Parameters: |
p_url - the string to convert. |
Generates: |
The converted string. |
This generates the <FONT> and </FONT> tags, which mark a section of text with the specified font characteristics.
This formats column values inside an HTML table using htf.tableData. It allows better control over the HTML tables.
This generates the <INPUT> tag with TYPE="checkbox", which inserts a checkbox element in a form. A checkbox element is a button that the user toggles on or off.
This generates the <FORM> and </FORM> tags, which create a form section in an HTML document.
This generates the <INPUT> tag with TYPE="hidden", which inserts a hidden form element. This element is not seen by the user. It submits additional values to the script.
This generates the <INPUT> tag with TYPE="hidden", which inserts a hidden form element. This element is not seen by the user. It submits additional values to the script.
This generates the <INPUT> tag with TYPE="image", which creates an image field that the user clicks to submit the form immediately. 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 .y appended. Any VALUE attribute is ignored.
This generates the <INPUT> tag with TYPE="password", which creates a single-line text entry field. When the user enters text in the field, each character is represented by one asterisk. This is used for entering passwords.
This generates the <INPUT> tag with TYPE="radio", which creates a radio button on the HTML form. Within a set of radio buttons, the user selects only one. Each radio button in the same set has the same name, but different values. The selected radio button generates a name/value pair.
This generates the <INPUT> tag with TYPE="reset", which creates a button that, when selected, resets the form fields to their initial values.
This generates the <SELECT> and </SELECT> tags, which creates a Select form element. A Select form element is a listbox where the user selects one or more values. The values are inserted using htp.formSelectOption.
This generates the <OPTION> tag, which represents one choice in a Select element.
This generates the <INPUT> tag with TYPE="submit", which creates a button that, when clicked, submits the form.
If the button has a NAME attribute, the button contributes a name/value pair to the submitted data.
This generates the <INPUT> tag with TYPE="text", which creates a field for a single line of text.
This generates the <TEXTAREA> tag, which creates a text field that has no predefined text in the text area. This field enables entering several lines of text.
The difference between these subprograms is that htp.formTextarea2 has the cwrap parameter, which specifies a wrap style.
This generates the <TEXTAREA> and </TEXTAREA> tags, which creates a text area form element The difference between the two open subprograms is that htp.formTextareaOpen2 has the cwrap parameter, which specifies a wrap style.
This generates the <FRAME> tag, which defines the characteristics of a frame created by a <FRAMESET> tag.
This generates the <FRAMESET> and </FRAMESET> tags, which define a frameset section.
This generates the <HEAD> and </HEAD> tags, which mark the HTML document head section
Properties | Definitions |
---|---|
Syntax: |
htp.headOpen; htf.headOpen return varchar2; htp.headClose; htf.headClose return varchar2; |
Parameters: |
>> |
Generates: |
</HEAD> |
This generates opening heading tags (<H1> to <H6>) and their corresponding closing tags (</H1> to </H6>).
This generates the <HTML> and </HTML> tags, which mark the beginning and the end of an HTML document.
Properties | Definitions |
---|---|
Syntax: |
|
Parameters: |
None. |
Generates: |
<HTML> |
This generates the <IMG> tag, which directs the browser to load an image onto the HTML page. The difference between these subprograms is that htp.img2 uses the cusemap parameter.
This 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.
This generates the <I> and </I> tags, which direct the browser to render the text in italics
This generates the <KBD> and </KBD> tags, which direct the browser to render the text in monospace. These subprograms do the same thing.
This generates the <HR> tag, which generates a line in the HTML document.
This generates the <LINK> tag with the REL attribute, which 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 create a link, use htp.anchor, htp.anchor2.
This generates the <LINK> tag with the REV attribute, which 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 create a link, use htp.anchor, htp.anchor2.
This generates the <LH> and </LH> tags, which print an HTML tag at the beginning of the list.
This generates the <LISTING> and </LISTING> tags, which mark a section of fixed-width text in the body of an HTML page.
Properties | Definitions |
---|---|
Syntax: |
htp.listingOpen; htf.listingOpen return varchar2; htp.listingClose; htf.listingClose return varchar2; |
Parameters: |
None. |
Generates: |
<LISTING> |
This generates the <LI> tag, which indicates a list item.
This generates the <A> tag with the HREF set to `mailto' prepended to the mail address argument.
This generates the <MAP> and </MAP> tags, which mark a set of regions in a client-side image map.
This generates the <MENU> and </MENU> tags, which create a list that presents one line per item. The items in the list appear more compact than an unordered list. The htp.listItem defines the list items in a menu list.
Properties | Definitions |
---|---|
Syntax: |
htp.menulistOpen; htf.menulistOpen return varchar2; htp.menulistClose; htf.menulistClose return varchar2; |
Parameters: |
None. |
Generates: |
<MENU> |
This generates the <META> tag, which embeds meta-information about the document and also specifies values for HTTP headers. For example, you specify the expiration date, keywords, and author name.
This generates the <BR> tag, which begins a new line of text.
This generates the <NOBR> and </NOBR> tags, which turn off line-breaking in a section of text.
Properties | Definitions |
---|---|
Syntax: |
htp.nobr(ctext in varchar2); htf.nobr(ctext) return varchar2; |
Parameters: |
ctext - the text that is to be rendered on one line. |
Generates: |
<NOBR>ctext</NOBR> |
This generates the <NOFRAMES> and </NOFRAMES> tags, which mark a no-frames section.
Properties | Definitions |
---|---|
Syntax: |
htp.noframesOpen htf.noframesOpen return varchar2; htp.noframesClose htf.noframesClose return varchar2; |
Parameters: |
None. |
Generates: |
<NOFRAMES> |
See Also: |
This generates the <OL> and </OL> tags, which define an ordered list. An ordered list presents a list of numbered items. Numbered items are added using htp.listItem.
This generates the <P> tag, which indicates that the text that comes after the tag is to be formatted as a paragraph. htp.paragraph enables you to add attributes to the tag.
This generates the <PARAM> tag, which specifies parameter values for Java applets. The values can reference HTML variables. To invoke a Java applet from a Web page, use htp.appletopen
to begin the invocation. Use one htp.param for each desired name-value pair, and use htp.appletclose
to end the applet invocation.
This generates the <PLAINTEXT> and </PLAINTEXT> tags, which direct the browser to render the text they surround in fixed-width type.
This generates the <PRE> and </PRE> tags, which mark a section of preformatted text in the body of the HTML page.
htp.print
generates the specified parameter as a string terminated with the \n
newline character. The \n
character is not the same as <BR>
. The \n
character formats the HTML source; it does not affect how the browser renders the HTML source. Use <BR>
to control how the browser renders the HTML source.
generates the specified parameter as a string. Unlike
htp.prn htp.print
, the string is not terminated with the \n
newline character. These subprograms are procedures only, they do not come as functions.
Both these subprograms generate a string and replace the following characters with the corresponding escape sequence.
If not replaced, the special characters are interpreted as HTML control characters and produce garbled output. This procedure is the same as htp.prn
but with the character substitution. These subprograms are procedures only, they are not available as functions. Use htf.escape_sc if you need a string conversion function.
Properties | Definitions |
---|---|
Syntax: |
htp.prints(ctext in varchar2); htp.ps(ctext in varchar2); |
Parameters: |
ctext - the string where to perform character substitution. |
Generates: |
A string. |
This generates the <S> and </S> tags, which direct the browser to render the text they surround in strikethrough type.
This generates the <SAMP> and </SAMP> tags, which direct the browser to render the text they surround in monospace font.
This generates the <SCRIPT> and </SCRIPT> tags, which contain a script written in languages such as JavaScript and VBscript.
This generates the <SMALL> and </SMALL> tags, which direct the browser to render the text they surround using a small font.
This generates the <STRIKE> and </STRIKE> tags, which direct the browser to render the text they surround in strikethrough type.
This generates the <STRONG> and </STRONG> tags, which direct the browser to render the text they surround in bold.
This generates the <STYLE> and </STYLE> tags, which include a style sheet in your Web page. Style sheets are a feature of HTML 3.2. You can get more information about style sheets at http://www.w3.org. This feature is not compatible with browsers that support only HTML versions 2.0 or earlier. Such browsers will ignore this tag.
Properties | Definitions |
---|---|
Syntax: |
|
Parameters: |
cstyle - the style information to include. |
Generates: |
<STYLE>cstyle</STYLE> |
This generates the <SUB> and </SUB> tags, which direct the browser to render the text they surround as subscript.
This generates the <SUP> and </SUP> tags, which direct the browser to render the text they surround as superscript.
This generates the <CAPTION> and </CAPTION> tags, which place a caption in an HTML table.
This generates the <TD> and </TD> tags, which insert data into a cell of an HTML table.
This generates the <TH> and </TH> tags, which insert a header cell in an HTML table. The <TH> tag is similar to the <TD> tag, except that the text in the rows are usually rendered in bold type.
This generates the <TABLE> and </TABLE> tags, which define an HTML table.
This generates the <TR> and </TR> tags, which inserts a new row in an HTML table.
This generates the <TT> and </TT> tags, which direct the browser to render the text they surround in a fixed width typewriter font, for example, the courier font.
This generates the <TITLE> and </TITLE> tags, which specify the text to display in the titlebar of the browser window.
This generates the <UL> and </UL> tags, which define an unordered list. An unordered list presents items with bullets. Add list items with htp.listItem.
This generates the <U> and </U> tags, which direct the browser to render the text they surround with an underline.
This generates the <VAR> and </VAR> tags, which direct the browser to render the text they surround in italics.
This generates the <WBR> tag, which inserts a soft line break within a section of NOBR text.
Properties | Definitions |
---|---|
Syntax: |
htp.wbr; htf.wbr return wbr; |
Parameters: |
None. |
Generates: |
<WBR> |
|
Copyright © 2001 Oracle Corporation. All Rights Reserved. |
|