Skip Headers

Oracle® XML DB Developer's Guide
10g Release 1 (10.1)

Part Number B10790-01
Go to Documentation Home
Go to Book List
Book List
Go to Index
Go to Master Index
Master Index
Go to Feedback page

Go to next page
View PDF


List of Examples

List of Figures

List of Tables

Title and Copyright Information

Send Us Your Comments


Intended Audience
Documentation Accessibility
Related Documents

What's New In Oracle XML DB?

Oracle XML DB: Oracle Database 10g Release 1 (10.1), Enhancements
Oracle Text Enhancements
Oracle Streams Advanced Queuing (AQ) Support
Oracle XDK Support for XMLType

Part I Introducing Oracle XML DB

1 Introducing Oracle XML DB

Introducing Oracle XML DB
Oracle XML DB Architecture
XMLType Storage
Oracle XML DB Repository
APIs for Accessing and Manipulating XML
XML Services
XML Repository Architecture
How Does Oracle XML DB Repository Work?
Oracle XML DB Protocol Architecture
Programmatic Access to Oracle XML DB (Java, PL/SQL, and C)
Oracle XML DB Features
XML Schema
Structured Versus Unstructured Storage
XML / SQL Duality
SQL/XML ICITS Standard Operators
XPath and XQuery Rewrite
Oracle XML DB Benefits
Unifying Data and Content with Oracle XML DB
Exploiting Database Capabilities
Exploiting XML Capabilities
Oracle XML DB Offers Faster Storage and Retrieval of Complex XML Documents
Oracle XML DB Helps You Integrate Applications
When Your Data Is Not XML You Can Use XMLType Views
Searching XML Data Stored in CLOBs Using Oracle Text
Building Messaging Applications using Oracle Streams Advanced Queuing
Managing Oracle XML DB Applications with Oracle Enterprise Manager
Requirements for Running Oracle XML DB
Standards Supported by Oracle XML DB
Oracle XML DB Technical Support
Oracle XML DB Examples Used in This Manual
Further Oracle XML DB Case Studies and Demonstrations

2 Getting Started with Oracle XML DB

Installing Oracle XML DB
When to Use Oracle XML DB
Designing Your XML Application
Oracle XML DB Design Issues: Introduction
a. Data
b. Access
c. Application Language
d. Processing
e. Storage
Oracle XML DB Application Design: a. How Structured Is Your Data?
XML Schema-Based or Non-Schema-Based
Oracle XML DB Application Design: b. Access Models
Oracle XML DB Application Design: c. Application Language
Oracle XML DB Application Design: d. Processing Models
Messaging Options
Oracle XML DB Design: e. Storage Models
Using XMLType Tables
Using XMLType Views
Oracle XML DB Performance
XML Storage Requirements
XML Memory Management
XML Parsing Optimizations
Node-Searching Optimizations
XML Schema Optimizations
Load Balancing Through Cached XML Schema
Reduced Non-Native Code Bottlenecks
Reduced Java Type Conversion Bottlenecks

3 Using Oracle XML DB

Storing XML as XMLType
What is XMLType
Benefits of the XMLType Datatype and API
When to Use XMLType
There are Two Main Ways to Store XMLType Data: LOBs and Structured
Advantages and Disadvantages of XML Storage Options in Oracle XML DB
When to Use CLOB Storage for XMLType
Creating XMLType Tables and Columns
Loading XML Content Into Oracle XML DB
Loading XML Content into Oracle XML DB Using SQL or PL/SQL
Loading XML Content into Oracle XML DB Using Java
Loading XML Content into Oracle XML DB Using C
Loading Very Large XML Files of Smaller XML Documents into Oracle Database
Loading Large XML Files into Oracle Database Using SQL*Loader
Loading XML Documents into Oracle XML DB Repository
Loading Documents into Oracle XML DB Repository Using Protocols
Handling Non-ASCII XML Documents
XML Encoding Declaration
Loading Non-ASCII XML Documents
Retrieving Non-ASCII XML Documents
APIs Introduced in 10g Release 1 for Handling Non-ASCII Documents
Introducing the W3C XML Schema Recommendation
XML Instance Documents
The Schema for Schemas
Editing XML Schemas
XML Schema Features
Text Representation of the PurchaseOrder XML Schema
Graphical Representation of the PurchaseOrder XML Schema
XML Schema and Oracle XML DB
Why Use XML Schema With Oracle XML DB?
Validating Instance Documents with XML Schema
Constraining Instance Documents for Business Rules or Format Compliance
Defining How XMLType Contents Must be Stored in the Database
Structured Storage of XML Documents
Annotating an XML Schema to Control Naming, Mapping, and Storage
Controlling How XML Collections are Stored in the Database
Collections: Default Mapping
Declaring the Oracle XML DB Namespace
Registering an XML Schema with Oracle XML DB
SQL Types and Tables Created During XML Schema Registration
Working with Large XML Schemas
Working with Global Elements
Creating XML Schema-Based XMLType Columns and Tables
Default Tables
Identifying Instance Documents
noNamespaceSchemaLocation Attribute
schemaLocation Attribute
Dealing with Multiple Namespaces
Using the Database to Enforce XML Data Integrity
Comparing Partial to Full XML Schema Validation
Partial Validation
Full Validation
Using SQL Constraints to Enforce Referential Integrity
DML Operations on XML Content Using Oracle XML DB
XPath and Oracle XML
Querying XML Content Stored in Oracle XML DB
A PurchaseOrder XML Document
Retrieving the Content of an XML Document Using Object_Value
Accessing Fragments or Nodes of an XML Document Using extract()
Accessing Text Nodes and Attribute Values Using extractValue()
Invalid Use of extractValue()
Searching the Content of an XML Document Using existsNode()
Using extractValue() and existsNode() in the WHERE Clause
Using XMLSequence() to Perform SQL Operations on XMLType Fragments
Accessing and Updating XML Content in Oracle XML DB Repository
Relational Access to XML Content Stored in Oracle XML DB Using Views
Updating XML Content Stored in Oracle XML DB
Updating XML Schema-Based and Non-Schema-Based XML Documents
Namespace Support in Oracle XML DB
Processing XMLType Methods and XML-Specific SQL Functions
Understanding and Optimizing XPath Rewrite
Using the EXPLAIN Plan to Tune XPath Rewrites
Using Indexes to Tune Simple XPath-Based Operations
Using Indexes to Improve Performance of XPath-Based Functions
Optimizing Operations on Collections
Using Indexes to Tune Queries on Collections Stored as Nested Tables
EXPLAIN Plan Output with ACL-Based Security Enabled: SYS_CHECKACL() Filter
Accessing Relational Database Content Using XML
Generating XML From Relational Tables Using DBUriType
XSL Transformation
Using XSLT with Oracle XML DB
Using Oracle XML DB Repository
Installing and Uninstalling Oracle XML DB Repository
Oracle XML DB Provides Name-Level Not Folder-Level Locking
Use Protocols or SQL to Access and Process Repository Content
Using Standard Protocols to Store and Retrieve Content
Uploading Content Into Oracle XML DB Using FTP
Accessing Oracle XML DB Repository Programmatically
Accessing the Content of Documents Using SQL
Accessing the Content of XML Schema-Based Documents
Using the XMLRef Element in Joins to Access Resource Content in the Repository
Updating the Content of Documents Stored in Oracle XML DB Repository
Updating Repository Content Using Protocols
Updating Repository Content Using SQL
Updating XML Schema-Based Documents in the Repository
Controlling Access to Repository Data
XML DB Transactional Semantics
Querying Metadata and the Folder Hierarchy
Querying Resources Stored in RESOURCE_VIEW and PATH_VIEW
The Oracle XML DB Hierarchical Index
How Documents are Stored in Oracle XML DB Repository
Viewing Relational Data as XML From a Browser
Using DBUri Servlet to Access Any Table or View From a Browser
XSL Transformation Using DBUri Servlet

Part II Storing and Retrieving XML Data in Oracle XML DB

4 XMLType Operations

Manipulating XML Data With SQL Member Functions
Selecting and Querying XML Data
Searching XML Documents With XPath Expressions
Oracle Extension XPath Function Support
Selecting XML Data Using XMLType Member Functions
Querying XML Data Using XMLType Functions
existsNode() XMLType Function
Using Indexes to Evaluate existsNode()
extract() XMLType Function
extractValue() XMLType Function
A Shortcut Function
extractValue() Characteristics
Querying XML Data With SQL
Updating XML Instances and XML Data in Tables
updateXML() XMLType Function
updateXML() and NULL Values
Updating the Same XML Node More Than Once
Guidelines For Preserving DOM Fidelity When Using updateXML()
When DOM Fidelity is Preserved
When DOM Fidelity is Not Preserved
Optimization of updateXML()
Creating Views of XML Data with updateXML()
Indexing XMLType Columns
XPATH REWRITE for indexes on Singleton Elements or Attributes
Creating B-Tree Indexes on the Contents of a Collection
Creating Function-Based Indexes on XMLType Tables and Columns
CTXXPath Indexes on XMLType Columns
CTXXPATH Indexing Features
Creating CTXXPATH Indexes
Creating CTXXPATH Storage Preferences With CTX_DDL. Statements
Performance Tuning a CTXXPATH Index: Synchronizing and Optimizing
Choosing the Right Plan: Using CTXXPATH Index in existsNode() Processing
CTXXPATH Indexes On XML Schema-Based XMLType Tables
Determining If an Index is Being Used: Tracing
CTXXPATH Indexing Depends on Storage Options and Document Size
Oracle Text Indexes on XMLType Columns

5 XML Schema Storage and Query: The Basics

Introducing XML Schema
XML Schema and Oracle XML DB
Using Oracle XML DB and XML Schema
Why We Need XML Schema
XML Schema Provides Flexible XML-to-SQL Mapping Setup
XML Schema Allows XML Instance Validation
DTD Support in Oracle XML DB
Inline DTD Definitions
External DTD Definitions
Managing XML Schemas Using DBMS_XMLSCHEMA
Registering Your XML Schema
Storage and Access Infrastructure
Transactional Action of XML Schema Registration
Managing and Storing XML Schema
Debugging XML Schema Registration
SQL Object Types
Creating Default Tables During XML Schema Registration
Generated Names are Case Sensitive
Objects That Depend on Registered XML Schemas
How to Obtain a List of Registered XML Schemas
Deleting Your XML Schema Using DBMS_XMLSCHEMA
XML Schema-Related Methods of XMLType
Local and Global XML Schemas
Local XML Schema
Global XML Schema
DOM Fidelity
How Oracle XML DB Ensures DOM Fidelity with XML Schema
DOM Fidelity and SYS_XDBPD$
Creating XMLType Tables and Columns Based on XML Schema
Specifying Unstructured (LOB-Based) Storage of Schema-Based XMLType
Specifying Storage Models for Structured Storage of Schema-Based XMLType
Specifying Relational Constraints on XMLType Tables and Columns
Oracle XML Schema Annotations
Querying a Registered XML Schema to Obtain Annotations
SQL Mapping Is Specified in the XML Schema During Registration
Mapping of Types Using DBMS_XMLSCHEMA
Setting Attribute Mapping Type Information
Overriding the SQLType Value in XML Schema When Declaring Attributes
Setting Element Mapping Type Information
Overriding the SQLType Value in XML Schema When Declaring Elements
Mapping simpleTypes to SQL
simpleType: Mapping XML Strings to SQL VARCHAR2 Versus CLOBs
Working with Time Zones
Mapping complexTypes to SQL
Specifying Attributes in a complexType XML Schema Declaration
XPath Rewrite with XML Schema-Based Structured Storage
What Is XPath Rewrite?
When Does XPath Rewrite Occur?
What XPath Expressions Are Rewritten?
Common XPath Constructs Supported in XPath Rewrite
Unsupported XPath Constructs in XPath Rewrite
Common XMLSchema constructs supported in XPath Rewrite
Unsupported XML Schema Constructs in XPath Rewrite
Common storage constructs supported in XPath Rewrite
Unsupported Storage Constructs in XPath Rewrite
Is there a difference in XPath logic with rewrite?
How are the XPaths Rewritten?
Rewriting XPath Expressions: Mapping Types and Path Expressions
Rewrite of SQL Functions
Diagnosing XPath Rewrite
Using Explain Plans
Using Events

6 XML Schema Storage and Query: Advanced Topics

Generating XML Schema Using DBMS_XMLSCHEMA.generateSchema()
Adding Unique Constraints to An Attribute's Elements
Setting the SQLInLine Attribute to FALSE for Out-of-Line Storage
Query Rewrite For Out-Of-Line Tables
Storing Collections in Out-Of-Line Tables
Intermediate table for storing the list of references
Fully Qualified XML Schema URLs
Fully Qualified XML Schema URLs Permit Explicit Reference to XML Schema URLs
Mapping XML Fragments to Large Objects (LOBs)
Oracle XML DB complexType Extensions and Restrictions
complexType Declarations in XML Schema: Handling Inheritance
Mapping complexType: simpleContent to Object Types
Mapping complexType: Any and AnyAttributes
Inserting New Instances into XMLType Columns
Examining Type Information in Oracle XML DB
ora:instanceof() and ora:instanceof-only()
Working With Circular and Cyclical Dependencies
For Circular Dependency Set GenTables Parameter to TRUE
Handling Cycling Between complexTypes in XML Schema
How a complexType Can Reference Itself
Oracle XML DB: XPath Expression Rewrites for existsNode()
existsNode Mapping with Document Order Maintained
existsNode Mapping Without Maintaining Document Order
Oracle XML DB: Rewrite for extractValue()
Oracle XML DB: Rewrite for extract()
Extract Mapping with Document Order Maintained
Extract Mapping Without Maintaining Document Order
Optimizing Updates Using updateXML()
Cyclical References Between XML Schemas
Guidelines for Using XML Schema and Oracle XML DB
Using Bind Variables in XPath Expressions
Creating Constraints on Repetitive Elements in Schema-Based XML Instance Documents
Guidelines for Loading and Retrieving Large Documents with Collections
Guidelines for Setting xdbcore Parameters
Updating Your XML Schema Using Schema Evolution

7 XML Schema Evolution

Introducing XML Schema Evolution
Limitations of CopyEvolve()
Example XML Schema
Guidelines for Using DBMS_XMLSCHEMA.CopyEvolve()
Top-Level Element Name Changes
Ensure that the XML Schema and Dependents are Not Used by Concurrent Sessions
What Happens When CopyEvolve() Raises an Error? Rollback
Failed Rollback From Insufficient Privileges
Using CopyEvolve(): Privileges Needed
DBMS_XMLSCHEMA.CopyEvolve() Syntax
How DBMS_XMLSCHEMA.CopyEvolve() Works

8 Transforming and Validating XMLType Data

Transforming XMLType Instances
XMLTransform() and XMLType.transform()
XMLTransform() Examples
Validating XMLType Instances
Validating XML Data Stored as XMLType: Examples

9 Full Text Search Over XML

Full Text Search and XML
Comparison of Full Text Search and Other Search Types
XML search
Search using Full Text and XML Structure
About the Examples in this Chapter
Roles and Privileges
Examples Schema and Data
Overview of CONTAINS and ora:contains
Overview of the CONTAINS SQL Function
Overview of the ora:contains XPath Function
Comparison of CONTAINS and ora:contains
Full Text Search
Boolean Operators: AND, OR, NOT
Stemming: $
Combining Boolean and Stemming Operators
Structure: Restricting the Scope of the Search
Structure: Projecting the Result
Introduction to the CONTEXT Index
Effect of the CONTEXT Index on CONTAINS
The CONTEXT Index: Preferences
Introduction to Section Groups
ora:contains XPath Function
Full Text Search
Structure: Restricting the Scope of the Query
Structure: Projecting the Result
Introduction to Policies
Effect of Policies on ora:contains
Policy Defaults
ora:contains Performance
Use a Primary Filter in the Query
Use a CTXXPath Index
Query-Rewrite and the CONTEXT Index
Text Path BNF
Example Support
Purchase Order po001.xml
Create Table Statements
An XML Schema for the Sample Data

Part III Using APIs for XMLType to Access and Operate on XML

10 PL/SQL API for XMLType

Introducing PL/SQL APIs for XMLType
PL/SQL APIs For XMLType Features
Lazy XML Loading (Lazy Manifestation)
XMLType Datatype Now Supports XML Schema
XMLType Supports Data in Different Character Sets.
With PL/SQL APIs for XMLType You Can Modify and Store XML Elements
Introducing W3C Document Object Model (DOM) Recommendation
W3C DOM Extensions Not Supported in This Release
Supported W3C DOM Recommendations
Difference Between DOM and SAX
Enhanced Performance
Designing End-to-End Applications Using XDK and Oracle XML DB
Using PL/SQL DOM API for XMLType: Preparing XML Data
Generating an XML Schema Mapping to SQL Object Types
DOM Fidelity for XML Schema Mapping
Wrapping Existing Data into XML with XMLType Views
Non-Supported DBMS_XMLDOM Methods in This Release
PL/SQL DOM API for XMLType: Node Types
Working with Schema-Based XML Instances
DOM NodeList and NamesNodeMap Objects
PL/SQL DOM API for XMLType (DBMS_XMLDOM): Calling Sequence
PL/SQL DOM API for XMLType Examples
PL/SQL Parser API for XMLType: Features
PL/SQL Parser API for XMLType (DBMS_XMLPARSER): Calling Sequence
PL/SQL Parser API for XMLType Example
Enabling Transformations and Conversions with XSLT
PL/SQL XSLT Processor for XMLType: Features
PL/SQL Parser API for XMLType (DBMS_XSLPROCESSOR): Calling Sequence
PL/SQL XSLT Processor for XMLType Example


Insert Processing with DBMS_XMLSTORE
Update Processing with DBMS_XMLSTORE
Delete Processing with DBMS_XMLSTORE

12 Java API for XMLType

Introducing Java DOM API for XMLType
Java DOM API for XMLType
Accessing XML Documents in Repository
Accessing XML Documents Stored in Oracle Database (Java)
Using JDBC to Access XMLType Data
How Java Applications Use JDBC to Access XML Documents in Oracle XML DB
Using JDBC to Manipulate XML Documents Stored in a Database
Loading a Large XML Document into the Database With JDBC
Java DOM API for XMLType Features
Creating XML Documents Programmatically
Creating XML Schema-Based Documents
Java DOM API for XMLType Classes
Java Methods Not Supported
Java DOM API for XMLType: Calling Sequence

13 Using C API for XML With Oracle XML DB

Introducing the C API for XML (XDK and Oracle XML DB)
Using OCI and the C API for XML with Oracle XML DB
XML Context
OCIXmlDbFreeXmlCtx() Syntax
OCIXmlDbInitXmlCtx() Syntax
How to Use Oracle XML DB Functions
OCI Usage
Accessing XMLType Data From the Back End
Creating XMLType Instances on the Client
Common XMLType Operations in C

14 Using ODP.NET With Oracle XML DB

Overview of Oracle Data Provider for .NET (ODP.NET)
ODP.NET Sample Code

Part IV Viewing Existing Data as XML

15 Generating XML Data from the Database

Oracle XML DB Options for Generating XML Data From Oracle Database
Generating XML Using SQL/XML Functions
Generating XML Using Oracle Database Extensions to SQL/XML
Generating XML Using DBMS_XMLGEN
Generating XML Using SQL Functions
Generating XML with XSQL Pages Publishing Framework
Generating XML Using XML SQL Utility (XSU)
Generating XML from the Database Using SQL/XML Functions
XMLElement() Function
XMLForest() Function
XMLSequence() Function
XMLConcat() Function
XMLAgg() Function
XMLColAttVal() Function
Generating XML from Oracle Database Using DBMS_XMLGEN
Sample DBMS_XMLGEN Query Result
DBMS_XMLGEN Calling Sequence
Generating XML Using Oracle Database-Provided SQL Functions
SYS_XMLGEN() Function
Using XMLFormat Object Type
SYS_XMLAGG() Function
Generating XML Using XSQL Pages Publishing Framework
Generating XML Using XML SQL Utility (XSU)
Guidelines for Generating XML With Oracle XML DB
Using XMLAgg ORDER BY Clause to Order Query Results Before Aggregation
Using XMLSequence in the TABLE Clause to Return a Rowset

16 XMLType Views

What Are XMLType Views?
Creating XMLType Views: Syntax
Creating Non-Schema-Based XMLType Views
Using SQL/XML Generation Functions
Using Object Types with SYS_XMLGEN()
Creating XML Schema-Based XMLType Views
Using SQL/XML Generation Functions
Step 1. Register XML Schema, emp_simple.xsd
Step 2. Create XMLType View Using SQL/XML Functions
Using Namespaces With SQL/XML Functions
Using Object Types and Views
Step 1. Create Object Types
Step 2. Create or Generate XMLSchema, emp.xsd
Step 3. Register XML Schema, emp_complex.xsd
Step 4a. Using the One-Step Process
Step 4b. Using the Two-Step Process by First Creating an Object View
Step 1. Create Object Types
Step 2. Register XML Schema, dept_complex.xsd
Step 3a. Create XMLType Views on Relational Tables
Step 3b. Create XMLType Views Using SQL/XML Functions
Creating XMLType Views From XMLType Tables
Referencing XMLType View Objects Using REF()
DML (Data Manipulation Language) on XMLType Views
XPath Rewrite on XMLType Views
XPath Rewrite on XMLType Views Constructed With SQL/XML Generation Functions
XPath Rewrite on Non-Schema-Based Views Constructed With SQL/XML
XPath Rewrite on View Constructed With SQL/XML Generation Functions
XPath Rewrite on Views Using Object Types, Object Views, and SYS_XMLGEN()
XPath Rewrite on Non-Schema-Based Views Using Object Types or Views
XPath Rewrite on XML-Schema-Based Views Using Object Types or Object Views
XPath Rewrite Event Trace
Generating XML Schema-Based XML Without Creating Views

17 Creating and Accessing Data Through URLs

How Oracle Database Works with URLs and URIs
Accessing and Processing Data Through HTTP
Creating Columns and Storing Data Using UriType
UriFactory Package
Other Sources of Information About URIs and URLs
URI Concepts
What Is a URI?
How to Create a URL Path From an XML Document View
UriType Objects Can Use Different Protocols to Retrieve Data
Advantages of Using DBUri and XDBUri
UriType Values Store Uri-References
Advantages of Using UriType Values
UriType Functions
HttpUriType Functions
getContentType() Function
getXML() Function
DBUri, Intra-Database References
Formulating the DBUri
Notation for DBUriType Fragments
DBUri Syntax Guidelines
Using Predicate (XPath) Expressions in DBUris
Some Common DBUri Scenarios
Identifying the Whole Table
Identifying a Particular Row of the Table
Identifying a Target Column
Retrieving the Text Value of a Column
How DBUris Differ from Object References
DBUri Applies to a Database and Session
Where Can DBUri Be Used?
DBUriType Functions
How to Create an Instance of XDBUriType
Creating Oracle Text Indexes on UriType Columns
Using UriType Objects
Storing Pointers to Documents with UriType
Using the Substitution Mechanism
Creating Instances of UriType Objects with the UriFactory Package
Registering New UriType Subtypes with the UriFactory Package
Why Define New Subtypes of UriType?
Rules for Passing Columns or Object Attributes to SYS_DBURIGEN()
Turning a URL into a Database Query with DBUri Servlet
DBUri Servlet Mechanism
DBUri Servlet: Optional Arguments
Installing DBUri Servlet
DBUri Security
Configuring the UriFactory Package to Handle DBUris

Part V Oracle XML DB Repository: Foldering, Security, and Protocols

18 Accessing Oracle XML DB Repository Data

Introducing Oracle XML DB Foldering
Oracle XML DB Repository
Repository Terminology
Current Repository Folder List
Oracle XML DB Resources
Where Exactly Is Repository Data Stored?
Generated Table Names
Defining Structured Storage for Resources
Path-Name Resolution
Deleting Resources
Accessing Oracle XML DB Repository Resources
Navigational or Path Access
Accessing Oracle XML DB Resources Using Internet Protocols
Where You Can Use Oracle XML DB Protocol Access
Protocol Access Calling Sequence
Retrieving Oracle XML DB Resources
Storing Oracle XML DB Resources
Using Internet Protocols and XMLType: XMLType Direct Stream Write
Configuring Default Namespace to Schema Location Mappings
Configuring XML File Extensions
Query-Based Access
Accessing Repository Data Using Servlets
Accessing Data Stored in Oracle XML DB Repository Resources
Managing and Controlling Access to Resources
Setting and Accessing Custom Namespace Properties

19 Managing Oracle XML DB Resource Versions

Introducing Oracle XML DB Versioning
Oracle XML DB Versioning Features
Oracle XML DB Versioning Terms Used in This Chapter
Oracle XML DB Resource ID and Path Name
Creating a Version-Controlled Resource (VCR)
Version Resource or VCR Version
Resource ID of a New Version
Accessing a Version-Controlled Resource (VCR)
Updating a Version-Controlled Resource (VCR)
Update Contents and Properties
Access Control and Security of VCR
Guidelines for Using Oracle XML DB Versioning


RESOURCE_VIEW Definition and Structure
PATH_VIEW Definition and Structure
Understanding the Difference Between RESOURCE_VIEW and PATH_VIEW
Operations You Can Perform Using UNDER_PATH and EQUALS_PATH
Resource_View and Path_View APIs
Using the Resource View and Path View API
Accessing Repository Data Paths, Resources and Links: Examples
Inserting Data into a Repository Resource: Examples
Deleting Repository Resources: Examples
Deleting Non-Empty Containers Recursively
Updating Repository Resources: Examples
Working with Multiple Oracle XML DB Resources Simultaneously
Performance Tuning of XML DB
Searching for Resources Using Oracle Text

21 PL/SQL Access and Management of Data Using DBMS_XDB

Introducing Oracle XML DB Resource API for PL/SQL
Overview of DBMS_XDB
DBMS_XDB: Oracle XML DB Resource Management
Using DBMS_XDB to Manage Resources, Calling Sequence
DBMS_XDB: Oracle XML DB ACL-Based Security Management
Using DBMS_XDB to Manage Security, Calling Sequence
DBMS_XDB: Oracle XML DB Configuration Management
Using DBMS_XDB for Configuration Management, Calling Sequence

22 Java Access to Repository Data Using Resource API for Java

Introducing Oracle XML DB Resource API for Java
Using Oracle XML DB Resource API for Java
Oracle XML DB Resource API for Java Parameters
Oracle XML DB Resource API for Java: Examples

23 Oracle XML DB Resource Security

Introducing Oracle XML DB Resource Security and ACLs
How the ACL-Based Security Mechanism Works
Relationship Between ACLs and Resources
Access Control List Concepts
Oracle XML DB Supported Privileges
Atomic Privileges
Aggregate Privileges
Interaction with Database Table Security
Working with Oracle XML DB ACLs
Creating an ACL Using DBMS_XDB.createResource()
Setting the ACL of a Resource
Deleting an ACL
Updating an ACL
Updating the Entire ACL or Adding or Deleting an Entire ACE
Updating Existing ACE(s)
Retrieving the ACL Document for a Given Resource
Retrieving Privileges Granted to the Current User for a Particular Resource
Checking if the Current User Has Privileges on a Resource
Checking if the Current User Has Privileges With the ACL and Resource Owner
Retrieving the Path of the ACL that Protects a Given Resource
Retrieving the Paths of all Resources Protected by a Given ACL
Integration with LDAP
Performance Issues for Using ACLs

24 FTP, HTTP, and WebDAV Access to Repository Data

Introducing Oracle XML DB Protocol Server
Session Pooling
HTTP Performance is Improved
Java Servlets
Oracle XML DB Protocol Server Configuration Management
Configuring Protocol Server Parameters
Interaction with Oracle XML DB File System Resources
Protocol Server Handles XML Schema-Based or Non-Schema-Based XML Documents
Event-Based Logging
Using FTP and Oracle XML DB Protocol Server
Oracle XML DB Protocol Server: FTP Features
Non-Supported FTP Features
Using FTP on Standard or Non-Standard Ports
FTP Server Session Management
Controlling Character Sets for FTP
Handling Error 421. Modifying the FTP Session's Default Timeout Value
Using HTTP and Oracle XML DB Protocol Server
Oracle XML DB Protocol Server: HTTP Features
Non-Supported HTTP Features
Using HTTP on Standard or Non-Standard Ports
HTTP Server and Java Servlets
Sending Multibyte Data From a Client
Non-Ascii Characters in URLs
Controlling Character Sets for HTTP
Using WebDAV and Oracle XML DB
Oracle XML DB WebDAV Features
Non-Supported WebDAV Features
Using Oracle XML DB and WebDAV: Creating a WebFolder in Windows 2000

25 Writing Oracle XML DB Applications in Java

Introducing Oracle XML DB Java Applications
Which Oracle XML DB APIs Are Available Inside and Outside the Database?
Design Guidelines: Java Inside or Outside the Database?
HTTP: Accessing Java Servlets or Directly Accessing XMLType Resources
Accessing Many XMLType Object Elements: Use JDBC XMLType Support
Use the Servlets to Manipulate and Write Out Data Quickly as XML
Writing Oracle XML DB HTTP Servlets in Java
Configuring Oracle XML DB Servlets
HTTP Request Processing for Oracle XML DB Servlets
The Session Pool and XML DB Servlets
Native XML Stream Support
Oracle XML DB Servlet APIs
Oracle XML DB Servlet Example
Installing the Oracle XML DB Example Servlet
Configuring the Oracle XML DB Example Servlet
Testing the Example Servlet

Part VI Oracle Tools that Support Oracle XML DB

26 Managing Oracle XML DB Using Oracle Enterprise Manager

Introducing Oracle XML DB and Oracle Enterprise Manager
Getting Started with Oracle Enterprise Manager and Oracle XML DB
Enterprise Manager: Installing Oracle XML DB
You Must Register Your XML Schema with Oracle XML DB
Oracle Enterprise Manager Oracle XML DB Features
Configure Oracle XML DB
Create and Manage Resources
Manage XML Schema and Related Database Objects
The Enterprise Manager Console for Oracle XML DB
XML Database Management Window: Right-Hand Dialog Windows
Hierarchical Navigation Tree: Navigator
Configuring Oracle XML DB with Enterprise Manager
Viewing or Editing Oracle XML DB Configuration Parameters
Category: Generic
Category: FTP
Category: HTTP
Creating and Managing Oracle XML DB Resources with Enterprise Manager
Administering Individual Resources
General Resources Page
Security Page
Individual Resource Content Menu
Create Resource
Grant Privileges On...
Show Contents
Show Grantee
Enterprise Manager and Oracle XML DB: ACL Security
Granting and Revoking User Privileges with User > XML Tab
Resources List
Available Privileges List
Granted List
XML Database Resource Privileges
Managing XML Schema and Related Database Objects
Navigating XML Schema in Enterprise Manager
Registering an XML Schema
General Page
Options Page
Creating Structured Storage Infrastructure Based on XML Schema
Creating Tables
Creating Views
Creating Function-Based Indexes
Creating an XMLType Table
Creating Tables with XMLType Columns
Creating a View Based on XML Schema
Creating a Function-Based Index Based on XPath Expressions

27 Loading XML Data into Oracle XML DB Using SQL*Loader

Loading XMLType Data into Oracle Database
Using SQL*Loader to Load XMLType Data
Using SQL*Loader to Load XMLType Data in LOBs
Loading LOB Data in Predetermined Size Fields
Loading LOB Data in Delimited Fields
Loading LOB Data from LOBFILEs
Dynamic Versus Static LOBFILE Specifications
Using SQL*Loader to Load XMLType Data Directly From the Control File
Loading Very Large XML Documents into Oracle Database

28 Importing and Exporting XMLType Tables

Overview of IMPORT/EXPORT Support in Oracle XML DB
Resources and Foldering Do Not Fully Support IMPORT/EXPORT
Non-XML Schema-Based XMLType Tables and Columns
XML Schema-Based XMLType Tables
Guidelines for Exporting Hierarchy-Enabled Tables
IMPORT/EXPORT Syntax and Examples
User Level Import/Export
Table Mode Export
Metadata in Repository is Not Exported During a Full Database Export
Importing and Exporting with Different Character Sets

Part VII XML Data Exchange Using Oracle Streams Advanced Queuing

29 Exchanging XML Data With Oracle Streams AQ

What Is Oracle Streams Advanced Queuing?
How Do AQ and XML Complement Each Other?
AQ and XML Message Payloads
AQ Enables Hub-and-Spoke Architecture for Application Integration
Messages Can Be Retained for Auditing, Tracking, and Mining
Advantages of Using AQ
Oracle Streams and AQ
Streams Message Queuing
XMLType Attributes in Object Types
Internet Data Access Presentation (iDAP)
iDAP Architecture
XMLType Queue Payloads
Guidelines for Using XML and Oracle Streams Advanced Queuing
Storing Oracle Streams AQ XML Messages with Many PDFs as One Record?
Adding New Recipients After Messages Are Enqueued
Enqueuing and Dequeuing XML Messages?
Parsing Messages with XML Content from Oracle Streams AQ Queues
Preventing the Listener from Stopping Until the XML Document Is Processed
Using HTTPS with AQ
Storing XML in Oracle Streams AQ Message Payloads
Comparing iDAP and SOAP

A Installing and Configuring Oracle XML DB

Installing Oracle XML DB
Installing or Reinstalling Oracle XML DB From Scratch
Installing a New Oracle XML DB With Database Configuration Assistant
Dynamic Protocol Registration Registers FTP and HTTP Services with Local Listener
Installing a New Oracle XML DB Manually Without Database Configuration Assistant
Reinstalling Oracle XML DB
Upgrading an Existing Oracle XML DB Installation
Upgrading Oracle XML DB From Release 9.2 to 10g Release 1 (10.1)
Privileges for Nested XMLType Tables When Upgrading to Oracle Database 10g
Configuring Oracle XML DB
Oracle XML DB Configuration File, xdbconfig.xml
Top Level Tag <xdbconfig>
Oracle XML DB Configuration Example
Oracle XML DB Configuration API
Get Configuration, cfg_get()
Update Configuration, cfg_update()
Refresh Configuration, cfg_refresh()

B XML Schema Primer

XML Schema and Oracle XML DB
XML Schema and Namespaces
XML Schema Can Specify a targetNamespace Attribute
XML Instance Documents Declare Which XML Schema to Use in Their Root Element
schemaLocation Attribute
noNamespaceSchemaLocation Attribute
Declaring and Identifying XML Schema Namespaces
Registering an XML Schema
Oracle XML DB Creates a Default Table
Deriving an Object Model: Mapping the XML Schema Constructs to SQL Types
Oracle XML DB and DOM Fidelity
Annotating an XML Schema
Identifying and Processing Instance Documents
Introducing XML Schema
Purchase Order, po.xml
Association Between the Instance Document and Purchase Order Schema
Purchase Order Schema, po.xsd
Purchase Order Schema, po.xsd
Prefix xsd:
XML Schema Components
Primary Components
Secondary Components
Helper Components
Complex Type Definitions, Element and Attribute Declarations
Defining the USAddress Type
Defining PurchaseOrderType
Occurrence Constraints: minOccurs and maxOccurs
Default Attributes
Default Elements
Global Elements and Attributes
Naming Conflicts
Simple Types
List Types
Creating a List of myInteger
Union Types
Anonymous Type Definitions
Two Anonymous Type Definitions
Element Content
Complex Types from Simple Types
Mixed Content
Empty Content
Building Content Models
Attribute Groups
Adding Attributes to the Inline Type Definition
Adding Attributes Using an Attribute Group
Nil Values
How DTDs and XML Schema Differ
DTD Limitations
XML Schema Features Compared to DTD Features
Converting Existing DTDs to XML Schema?
XML Schema Example, PurchaseOrder.xsd

C XPath and Namespace Primer

Introducing the W3C XML Path Language (XPath) 1.0 Recommendation
XPath Models an XML Document as a Tree of Nodes
The XPath Expression
Evaluating Expressions with Respect to a Context
Evaluating Subexpressions
XPath Expressions Often Occur in XML Attributes
Location Paths
Location Path Syntax Abbreviations
Location Path Examples Using Unabbreviated Syntax
Location Path Examples Using Abbreviated Syntax
Attribute Abbreviation @
Path Abbreviation //
Location Step Abbreviation .
Location Step Abbreviation ..
Abbreviation Summary
Relative and Absolute Location Paths
Location Path Syntax Summary
XPath 1.0 Data Model
Root Nodes
Element Nodes
Text Nodes
Attribute Nodes
Namespace Nodes
Processing Instruction Nodes
Comment Nodes
Document Order
Introducing the W3C Namespaces in XML Recommendation
What Is a Namespace?
URI References
Notation and Usage
Declaring Namespaces
Attribute Names for Namespace Declaration
When the Attribute Name Matches the PrefixedAttName
When the Attribute Name Matches the DefaultAttName
Namespace Constraint: Leading "XML"
Qualified Names
Qualified Name Syntax
What is the Prefix?
Using Qualified Names
Element Types
Namespace Constraint: Prefix Declared
Qualified Names in Declarations
Applying Namespaces to Elements and Attributes
Namespace Scoping
Namespace Defaulting
Uniqueness of Attributes
Conformance of XML Documents
Introducing the W3C XML Information Set
End-of-Line Handling
Base URIs
Unknown and No Value
Synthetic Infosets

D XSLT Primer

Introducing XSL
The W3C XSL Transformation Recommendation Version 1.0
Namespaces in XML
XSL Style-Sheet Architecture
XSL Transformation (XSLT)
XML Path Language (Xpath)
CSS Versus XSL
XSL Style-Sheet Example, PurchaseOrder.xsl

E Java APIs: Quick Reference

Java DOM API For XMLType (oracle.xdb and oracle.xdb.dom Classes)
Java Methods Not Supported
Oracle XML DB Resource API for Java (oracle.xdb.spi Classes)
Oracle Database 10g Release 1 (10.1): New Java APIs
New methods to Manage Node Values Added to
Java DOM APIs to Manage an Attribute Added to
New Java XMLType APIs

F SQL and PL/SQL APIs: Quick Reference

Oracle XML DB XML Schema Catalog Views
Resource API for PL/SQL (DBMS_XDB)
New PL/SQL APIs to Support XML Data in Different Character Sets

G C API for XML (Oracle XML DB): Quick Reference

XML Context
OCIXmlDbFreeXmlCtx() Syntax
OCIXmlDbInitXmlCtx() Syntax

H Oracle XML DB-Supplied XML Schemas and Additional Examples

RESOURCE_VIEW and PATH_VIEW Database and XML Schema
RESOURCE_VIEW Definition and Structure
PATH_VIEW Definition and Structure
XDBResource.xsd: XML Schema for Representing Oracle XML DB Resources
acl.xsd: XML Schema for Representing Oracle XML DB ACLs
ACL Representation XML Schema, acl.xsd
xdbconfig.xsd: XML Schema for Configuring Oracle XML DB
Loading XML Using C (OCI)

I Oracle XML DB Feature Summary

Oracle XML DB Feature Summary
XMLType Features
Oracle XML DB Repository Features
Standards Supported
Oracle XML DB Limitations