Oracle9i Supplied PL/SQL Packages and Types Reference
Release 1 (9.0.1)

Part Number A89852-02
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

DBMS_METADATA , 8 of 11


SET_TRANSFORM_PARAM Procedure

SET_TRANSFORM_PARAM specifies parameters to the XSL-T stylesheet identified by transform_handle.Use it to modify or customize the output of the transform.

Syntax

PROCEDURE set_transform_param
  (transform_handle IN NUMBER,
   name IN VARCHAR2,
   value IN VARCHAR2);
PROCEDURE set_transform_param
  (transform_handle IN NUMBER,
   name IN VARCHAR2,value IN BOOLEAN DEFAULT TRUE);

Parameters

Table 28-11 SET_TRANSFORM_PARAM Parameters
Parameters  Description 

transform_handle 

Either (1) the handle returned from ADD_TRANSFORM, or (2) the enumerated constant SESSION_TRANSFORM that designates the DDL transform for the whole session. Note that the handle returned by OPEN is not a valid transform handle. 

name 

The name of the parameter. Table 28-12 lists the transform parameters defined for the DDL transform, specifying the object_type it applies to, its datatype (in this case, always Boolean) and its meaning or effect (including its default value, if any). 

value 

The value of the transform. 


Table 28-12 SET_TRANSFORM_PARAM: Transform Parameters for the DDL Transform
Object Type  Name  Datatype  Meaning 

All objects 

PRETTY 

Boolean 

If TRUE, format the output with indentation and line feeds. Defaults to TRUE

SQLTERMINATOR 

Boolean 

If TRUE, append a SQL terminator (; or /) to each DDL statement. Defaults to FALSE

TABLE 

SEGMENT_ATTRIBUTES 

Boolean 

If TRUE, emit segment attributes (physical attributes, storage attributes, tablespace, logging). Defaults to TRUE

STORAGE 

Boolean 

If TRUE, emit storage clause. (Ignored if SEGMENT_ATTRIBUTES is FALSE.) Defaults to TRUE. 

TABLESPACE 

Boolean 

If TRUE, emit tablespace. (Ignored if SEGMENT_ATTRIBUTES is FALSE.) Defaults to TRUE

TABLE 

CONSTRAINTS 

Boolean 

If TRUE, emit all non-referential table constraints. Defaults to TRUE

REF_CONSTRAINTS 

Boolean 

If TRUE, emit all referential constraints (foreign key and scoped refs). Defaults to TRUE

CONSTRAINTS_AS_ALTER 

Boolean 

If TRUE, emit table constraints as separate ALTER TABLE (and, if necessary, CREATE INDEX) statements. If FALSE, specify table constraints as part of the CREATE TABLE statement. Defaults to FALSE. Requires that CONSTRAINTS be TRUE.  

OID 

Boolean 

If TRUE, emit the OID clause for object tables. Defaults to FALSE

SIZE_BYTE_KEYWORD 

Boolean 

If TRUE, emit the BYTE keyword as part of the size specification of CHAR and VARCHAR2 columns that use byte semantics. If FALSE, omit the keyword. Defaults to FALSE. 

INDEX 

SEGMENT_ATTRIBUTES 

Boolean 

If TRUE, emit segment attributes (physical attributes, storage attributes, tablespace, logging). Defaults to TRUE

STORAGE 

Boolean 

If TRUE, emit storage clause. (Ignored if SEGMENT_ATTRIBUTES is FALSE.) Defaults to TRUE

TABLESPACE 

Boolean 

If TRUE, emit tablespace. (Ignored if SEGMENT_ATTRIBUTES is FALSE.) Defaults to TRUE

TYPE 

SPECIFICATION 

Boolean 

If TRUE, emit the type specification. Defaults to TRUE

BODY 

Boolean 

If TRUE, emit the type body. Defaults to TRUE

PACKAGE

 

SPECIFICATION 

Boolean 

If TRUE, emit the package specification. Defaults to TRUE

BODY 

Boolean 

If TRUE, emit the package body. Defaults to TRUE

VIEW 

FORCE 

Boolean 

If TRUE, use the FORCE keyword in the CREATE VIEW statement. Defaults to TRUE

All objects 

DEFAULT 

Boolean 

Calling SET_TRANSFORM_PARAM with this parameter set to TRUE has the effect of resetting all parameters for the transform to their default values. Setting this FALSE has no effect. There is no default. 

INHERIT 

Boolean 

If TRUE, inherits session-level parameters. Defaults to FALSE. If an application calls ADD_TRANSFORM to add the DDL transform, then by default the only transform parameters that apply are those explicitly set for that transform handle. This has no effect if the transform handle is the session transform handle. 

Exceptions

Usage Notes

XSL-T allows parameters to be passed to stylesheets. You call SET_TRANSFORM_PARAM to specify the value of a parameter to be passed to the stylesheet identified by transform_handle. The most general way to specify stylesheet parameter values is as text strings. However, for the DDL transform, it is convenient to expose some parameters as Booleans. Consequently, two variants of the procedure are provided.

The GET_DDL function allows the casual browser to extract the creation DDL for an object. So that you can specify transform parameters, this package defines an enumerated constant SESSION_TRANSFORM as the handle of the DDL transform at the session level. You can call SET_TRANSFORM_PARAM using DBMS_METADATA.SESSION_TRANSFORM as the transform handle to set transform parameters for the whole session. GET_DDL inherits these parameters when it invokes the DDL transform.


Note:

The enumerated constant must be prefixed with the package name DBMS_METADATA.SESSION_TRANSFORM



Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback