14-2. Creating a Common Set of HTML Page Generation Procedures


Every web page you generate with a PL/SQL procedure requires a common HTML tag to start and another to finish every web page, and you do not wish to repeat the code to add those tags in every procedure you write for the Web.


Create a package that contains calls to the PL/SQL Web Toolkit procedures that produce the HTML code necessary to properly display a well-formed,1 HTML web page. In this example a package is created with two procedures, one to generate the HTML tags required to start a page and one to generate the closing HTML tags to finish a page.

CREATE OR REPLACE PACKAGE common AS    PROCEDURE header (title VARCHAR2);    PROCEDURE footer; END common;

Get Oracle and PL/SQL Recipes: A Problem-Solution Approach now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.