Skip Headers

Oracle9i XML API Reference - XDK and Oracle XML DB
Release 2 (9.2)

Part Number A96616-01
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 next page

31
Oracle XML DB Resource View API for PL/SQL

This chapter contains the following sections:


Oracle XML DB Resource View API


Description of Oracle XML DB Resource View package

The resource view and path view both provide a mechanism for SQL access for data that is stored in the Oracle XML DB repository. Data which is stored in the Oracle XML DB repository ia protocols like FTP, WebDAV or programming API such as JNDI can be accessed in SQL through these views and vice versa. Resource view and path view together (along with some PL/SQL packages) provide all the query and DML functionality that is available through the programming API. The PATH VIEW has one row for each unique path in the repository, whereas the resource view has one row for each resource in the repository.


Operators of Oracle XML DB Resource View package

Table 31-1 Summary of Operators of Oracle XML DB Resource View package  
Operator Description

UNDER_PATH

Using the Oracle XML DB hierarchical index, returns sub-paths of a particular path.

EQUALS_PATH

Finds the resource with the specified path name.

PATH

Returns the relative path name of the resource under the specified path name argument.

DEPTH

Returns the folder depth of the resource under the specified starting path.

UNDER_PATH

Description

The UNDER_PATH operator uses the Oracle XML DB hierarchical index to return the paths under a particular path. The hierarchical index is designed to speed access walking down a path name (the normal usage). If the other parts of the query predicate are very selective, however, a functional implementation of UNDER_PATH may be chosen that will walk back up the repository. This can be more efficient, since a much smaller number of links may need to be traversed. The options are described in the following table.

Syntax Description

INTEGER UNDER_PATH( resource_column,

pathname);

Determines if a resource is under a specified path.

INTEGER UNDER_PATH( resource_column,

depth,

pathname);

Determines if a resource is under a specified path, with a depth argument to restrict the number of levels to search.

INTEGER UNDER_PATH( resource_column,

pathname,

correlation)

Determines if a resource is under a specified path, with a correlation argument for ancillary operators.

INTEGER UNDER_PATH( resource_column,

depth,

pathname,

correlation)

Determines if a resource is under a specified path with a depth argument to restrict the number of levels to search, and with a correlation argument for ancillary operators.

Note that only one of the accessible paths to the resource needs to be under the path argument for a resource to be returned.

Parameter Description

resource_column

The column name or column alias of the 'resource' column in the path_view or resource_view.

pathname

The path name to resolve.

depth

The maximum depth to search; a depth of less than 0 is treated as 0.

correlation

An integer that can be used to correlate the UNDER_PATH operator (a primary operator) with ancillary operators (PATH & DEPTH).

he

EQUALS_PATH

Description

Finds the resource with the specified path name. The EQUALS_PATH operator is functionally equivalent to UNDER_PATH with a depth restriction of 0.

Syntax

EQUALS_PATH INTEGER EQUALS_PATH( resource_column,
                                 pathname);

Parameter Description

resource_column

The column name or column alias of the 'resource' column in the path_view or resource_view.

pathname

The path name to resolve.

he

PATH

Description

An ancillary operator that returns the relative path name of the resource under the specified pathname argument. Note that the path column in the resource view always contains the absolute path of the resource.

Syntax

PATH VARCHAR2 PATH( correlation);

Parameter Description

correlation

An integer that can be used to correlate the UNDER_PATH operator (a primary operator) with ancillary operators (PATH & DEPTH).

DEPTH

Description

An ancillary operator that returns the folder depth of the resource under the specified starting path.

Syntax

DEPTH  INTEGER DEPTH( correlation);

Parameter Description

correlation

An integer that can be used to correlate the UNDER_PATH operator (a primary operator) with ancillary operators (PATH & DEPTH).


Go to previous page Go to next page
Oracle
Copyright © 2001, 2002 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