1
The htp and htf Packages 1-1
1
The htp and htf Packages
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.titleHello; -- generates TITLEHelloTITLE htp.headclose; -- generates HEAD
htp.bodyopen; -- generates BODY htp.header1, Hello; -- generates H1HelloH1
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.
1.1 Summary
HTML, HEAD, and BODY Tags
htp.htmlOpen, htp.htmlClose - generate HTML and HTML
htp.headOpen, htp.headClose - generate HEAD and HEAD
htp.bodyOpen, htp.bodyClose - generate BODY and BODY
Comment Tag
htp.comment - generates -- and --
Note: If you use values of the LONG data type in procedures such
as htp.print, htp.prn, htp.prints, htp.pa or owa_util.cellsprint, only the first 32 K of the LONG data is used. The LONG data is bound to
a varchar2 data type in the procedure or function.
1-2 Oracle Fusion Middleware PLSQL Web Toolkit Reference
Tags in the HEAD Area
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
Applet Tags
htp.appletopen, htp.appletclose - generate APPLET and APPLET
htp.param - generates PARAM
List Tags
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
Form Tags
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
The htp and htf Packages 1-3
htp.formSubmit - generates INPUT TYPE=SUBMIT
Table Tags
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
IMG, HR, and A Tags
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
Paragraph Formatting Tags
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
Character Formatting Tags
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
1-4 Oracle Fusion Middleware PLSQL Web Toolkit Reference
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
Frame Tags
htp.frame - generates FRAME
htp.framesetOpen, htp.framesetClose - generate FRAMESET and FRAMESET
htp.noframesOpen, htp.noframesClose - generate NOFRAMES and
NOFRAMES
1.2 htp.address