Oracle XML DB Developer’s Guide E23094XML Developer's
User Manual:
Open the PDF directly: View PDF
Page Count: 956 [warning: Documents this large are best viewed by clicking the View PDF Link!]
- Contents
- List of Examples
- List of Figures
- List of Tables
- Preface
- What's New in Oracle XML DB?
- Oracle Database 11g Release 2 (11.2.0.3) Deprecated Oracle XML DB Constructs
- Oracle Database 11g Release 2 (11.2.0.3) Other Changes in Oracle XML DB
- Oracle Database 11g Release 2 (11.2.0.2) New Features in Oracle XML DB
- Oracle Database 11g Release 2 (11.2.0.2) Deprecated Oracle XML DB Constructs
- Oracle Database 11g Release 2 (11.2.0.1) New Features in Oracle XML DB
- Oracle Database 11g Release 2 (11.2.0.1) Deprecated Oracle XML DB Constructs
- Oracle Database 11g Release 1 (11.1) New Features in Oracle XML DB
- Part I Oracle XML DB Basics
- 1 Introduction to Oracle XML DB
- Overview of Oracle XML DB
- Oracle XML DB Architecture
- Oracle XML DB Features
- Oracle XML DB Benefits
- 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
- Oracle XML DB Installation
- Oracle XML DB Use Cases
- Application Design Considerations for Oracle XML DB
- Oracle XML DB Performance
- 3 Using Oracle XML DB
- Storing XML Data as XMLType
- Creating XMLType Tables and Columns
- Partitioning or Constraining Binary XML Data using Virtual Columns
- Loading XML Content into Oracle XML DB
- Loading XML Content using SQL or PL/SQL
- Loading XML Content using Java
- Loading XML Content using C
- Loading Large XML Files that Contain Small XML Documents
- Loading Large XML Files using SQL*Loader
- Loading XML Documents into the Repository using DBMS_XDB
- Loading Documents into the Repository using Protocols
- Character Sets of XML Documents
- Overview of the W3C XML Schema Recommendation
- Using XML Schema with Oracle XML DB
- Why Use XML Schema with Oracle XML DB?
- Structured Storage of XML Documents
- Annotating an XML Schema to Control Naming, Mapping, and Storage
- Controlling How Collections Are Stored for Object-Relational XMLType Storage
- Declaring the Oracle XML DB Namespace
- Registering an XML Schema with Oracle XML DB
- Creating XML Schema-Based XMLType Columns and Tables
- Default Tables
- Identifying XML Schema Instance Documents
- Enforcing XML Data Integrity using the Database
- DML Operations on XML Content using Oracle XML DB
- Querying XML Content Stored in Oracle XML DB
- PurchaseOrder XML Document
- Retrieving the Content of an XML Document using Pseudocolumn OBJECT_VALUE
- Accessing Fragments or Nodes of an XML Document using XMLQUERY
- Accessing Text Nodes and Attribute Values using XMLCAST and XMLQUERY
- Searching an XML Document using XMLEXISTS, XMLCast, and XMLQuery
- Performing SQL Operations on XMLType Fragments using XMLTABLE
- Accessing XML Data in Oracle XML DB using Relational Views
- Updating XML Content Stored in Oracle XML DB
- Namespace Support in Oracle XML DB
- How Oracle XML DB Processes XMLType Methods and SQL Functions
- Generating XML Data from Relational Data
- XSL Transformation and Oracle XML DB
- Using Oracle XML DB Repository
- Installing and Uninstalling Oracle XML DB Repository
- Oracle XML DB Provides Name-Level Locking
- Use Protocols or SQL to Access and Process Repository Content
- Storing and Retrieving Database Content using Standard Protocols
- Uploading Content to Oracle XML DB using FTP
- Accessing Oracle XML DB Repository Programmatically
- Accessing and Updating XML Content in the Repository
- Accessing the Content of Documents using SQL
- Accessing the Content of XML Schema-Based Documents
- Updating the Content of Documents Stored in the Repository
- Controlling Access to Repository Data
- Oracle XML DB Transactional Semantics
- Querying Metadata and the Folder Hierarchy
- Oracle XML DB Hierarchical Repository Index
- How Documents are Stored in the Repository
- Viewing Relational Data as XML From a Browser
- XSL Transformation using DBUri Servlet
- 1 Introduction to Oracle XML DB
- Part II Storing and Retrieving XML Data in Oracle XML DB
- 4 XMLType Operations
- Selecting and Querying XML Data
- Updating XML Data
- Updating an Entire XML Document
- SQL Functions that Update XML Data
- UPDATEXML SQL Function
- Optimization of Oracle SQL Functions that Modify XML Data
- Creating XML Views using Oracle SQL Functions that Modify XML Data
- INSERTCHILDXML SQL Function
- INSERTCHILDXMLBEFORE SQL Function
- INSERTCHILDXMLAFTER SQL Function
- INSERTXMLBEFORE SQL Function
- INSERTXMLAFTER SQL Function
- APPENDCHILDXML SQL Function
- DELETEXML SQL Function
- 5 Using XQuery with Oracle XML DB
- Overview of XQuery in Oracle XML DB
- Overview of the XQuery Language
- SQL/XML Functions XMLQUERY and XMLTABLE
- When To Use XQuery
- Predefined Namespaces and Prefixes
- URI Scheme oradb: Querying Table or View Data with XQuery
- Oracle XQuery Extension Functions
- Oracle XQuery Extension-Expression Pragmas
- XMLQUERY and XMLTABLE Examples
- Performance Tuning for XQuery
- XQuery Static Type-Checking in Oracle XML DB
- SQL*Plus XQUERY Command
- Using XQuery with PL/SQL, JDBC, and ODP.NET
- Oracle XML DB Support for XQuery
- 6 Indexing XMLType Data
- Oracle XML DB Tasks Involving Indexes
- Overview of Indexing XMLType Data
- Indexing XMLType Data Stored Object-Relationally
- XMLIndex
- Advantages of XMLIndex
- Structured and Unstructured XMLIndex Components
- XMLIndex Structured Component
- XMLIndex Unstructured Component
- Creating, Dropping, Altering, and Examining an XMLIndex Index
- Using XMLIndex with an Unstructured Component
- Using XMLIndex with a Structured Component
- How to Tell Whether XMLIndex is Used
- Turning Off Use of XMLIndex
- XMLIndex Path Subsetting: Specifying the Paths You Want to Index
- Guidelines for Using XMLIndex with an Unstructured Component
- Guidelines for Using XMLIndex with a Structured Component
- XMLIndex Partitioning and Parallelism
- Asynchronous (Deferred) Maintenance of XMLIndex Indexes
- Collecting Statistics on XMLIndex Objects for the Cost-Based Optimizer
- Data Dictionary Static Public Views Related to XMLIndex
- PARAMETERS Clause for CREATE INDEX and ALTER INDEX
- Using a Registered PARAMETERS Clause for XMLIndex
- PARAMETERS Clause Syntax for CREATE INDEX and ALTER INDEX
- Usage of XMLIndex_parameters_clause
- Usage of XMLIndex_parameters
- Usage of PATHS Clause
- Usage of create_index_paths_clause and alter_index_paths_clause
- Usage of pikey_clause, path_id_clause, and order_key_clause
- Usage of value_clause
- Usage of async_clause
- Usage of groups_clause and alter_index_group_clause
- Usage of XMLIndex_xmltable_clause
- Usage of column_clause
- Oracle Text Indexes on XML Data
- 7 XML Schema Storage and Query: Basic
- Overview of XML Schema and Oracle XML DB
- Using Oracle XML DB with XML Schema
- Managing XML Schemas with DBMS_XMLSCHEMA
- Registering an XML Schema with Oracle XML DB
- Delete and Reload Documents Before Registering Their XML Schema
- Storage and Access Infrastructure
- Atomic Nature of XML Schema Registration
- Managing and Storing XML Schemas
- Debugging XML Schema Registration for XML Data Stored Object-Relationally
- SQL Object Types Created During XML Schema Registration, for Structured Storage
- Default Tables Created During XML Schema Registration
- Do Not Use Internal Constructs Generated during XML Schema Registration
- Generated Names are Case Sensitive
- Database Objects That Depend on Registered XML Schemas
- Listing All Registered XML Schemas
- Deleting an XML Schema
- XMLType Methods Related to XML Schema
- Local and Global XML Schemas
- DOM Fidelity
- XML Translations
- Creating XMLType Tables and Columns Based on XML Schemas
- Oracle XML Schema Annotations
- Common Uses of XML Schema Annotations
- XML Schema Annotation Example
- Available Oracle XML DB XML Schema Annotations
- XML Schema Annotation Guidelines for Structured Storage
- Avoid Creation of Unnecessary Tables for Unused Top-Level Elements
- Provide Your Own Names for Default Tables
- Turn Off DOM Fidelity If Not Needed
- Use Unordered Collection Elements When Order Doesn't Matter
- Annotate Time-Related Elements with a Timestamp Data Type
- Add Table and Column Properties
- Store Large Collections Out of Line
- Querying a Registered XML Schema to Obtain Annotations
- Mapping XML Schema Data Types to Oracle XML DB Storage
- Mapping XML Schema Data Types to SQL Data Types
- 8 XPath Rewrite for Structured Storage
- Overview of XPath Rewrite for Structured Storage
- Sample of XPath Expressions that Are Rewritten
- Analyzing and Optimizing XPath Queries using Execution Plans
- Guideline: Look for underlying tables versus XML functions in execution plans
- Guideline: Name the default tables, so you recognize them in execution plans
- Guideline: Create an index on a column targeted by a predicate
- Guideline: Create indexes on ordered collection tables
- Guideline: Use XMLOptimizationCheck to determine why a query is not rewritten
- 9 XML Schema Storage and Query: Advanced
- Generating XML Schemas with DBMS_XMLSCHEMA.GENERATESCHEMA
- Adding Unique Constraints to the Parent Element of an Attribute
- Setting Annotation Attribute SQLInline to false for Out-Of-Line Storage
- Storing Collections in Out-Of-Line Tables
- Partitioning XMLType Tables and Columns Stored Object-Relationally
- Fully Qualified XML Schema URLs
- Mapping XML Fragments to Large Objects (LOBs)
- complexType Extensions and Restrictions in Oracle XML DB
- XML Schema: Working with Circular and Cyclical Dependencies
- Support for Recursive Schemas
- Loading and Retrieving Large Documents with Collections
- 10 XML Schema Evolution
- Overview of XML Schema Evolution
- Using Copy-Based Schema Evolution
- Scenario for Copy-Based Evolution
- copyEvolve Parameters and Errors
- Limitations of Procedure COPYEVOLVE
- Guidelines for Using Procedure COPYEVOLVE
- Top-Level Element Name Changes
- User-Created Virtual Columns of Tables Other Than Default Tables
- Ensure that the XML Schema and Dependents Are Not Used by Concurrent Sessions
- Rollback When Procedure DBMS_XMLSCHEMA.COPYEVOLVE Raises an Error
- Failed Rollback From Insufficient Privileges
- Privileges Needed for XML Schema Evolution
- Updating Existing XML Instance Documents using a Style Sheet
- Examples of Using Procedure COPYEVOLVE
- Using In-Place XML Schema Evolution
- 11 Transforming and Validating XMLType Data
- 12 Full-Text Search Over XML Data
- Overview of Full-Text Search for XML
- About the Full-Text Search Examples
- Overview of CONTAINS and ora:contains
- CONTAINS SQL Function
- ora:contains XQuery Function
- Text Path BNF Specification
- Support for Full-Text XML Examples
- 4 XMLType Operations
- Part III Using XMLType APIs
- 13 PL/SQL APIs for XMLType
- Overview of PL/SQL APIs for XMLType
- PL/SQL DOM API for XMLType (DBMS_XMLDOM)
- Overview of the W3C Document Object Model (DOM) Recommendation
- PL/SQL DOM API for XMLType (DBMS_XMLDOM): Features
- Designing End-to-End Applications using Oracle XML Developer's Kit and Oracle XML DB
- Preparing XML Data to Use the PL/SQL DOM API for XMLType
- Defining an XML Schema Mapping to SQL Object Types
- Wrapping Existing Data into XML with XMLType Views
- DBMS_XMLDOM Methods Supported
- PL/SQL DOM API for XMLType: Node Types
- Working with XML Schema-Based Data
- DOM NodeList and NamedNodeMap Objects
- Using the PL/SQL DOM API for XMLType (DBMS_XMLDOM)
- PL/SQL DOM API for XMLType – Examples
- Large Node Handling using DBMS_XMLDOM
- Get-Push Model
- Get-Pull Model
- Set-Pull Model
- Set-Push Model
- Determining Binary Stream or Character Stream
- PL/SQL Parser API for XMLType (DBMS_XMLPARSER)
- PL/SQL XSLT Processor for XMLType (DBMS_XSLPROCESSOR)
- PL/SQL Translation API for XMLType (DBMS_XMLTRANSLATIONS)
- 14 PL/SQL Package DBMS_XMLSTORE
- 15 Java DOM API for XMLType
- 16 Using the C API for XML
- Overview of the C API for XML (Oracle XDK and Oracle XML DB)
- Using OCI and the C API for XML with Oracle XML DB
- XML Context Parameter for C DOM API Functions
- Initializing and Terminating an XML Context
- Using the C API for XML with Binary XML
- Using the Oracle XML Developer's Kit Pull Parser with Oracle XML DB
- Common XMLType Operations in C
- 17 Using Oracle Data Provider for .NET with Oracle XML DB
- 13 PL/SQL APIs for XMLType
- Part IV Viewing Existing Data as XML
- 18 Generating XML Data from the Database
- Overview of Generating XML Data From Oracle Database
- Generating XML using SQL Functions
- XMLELEMENT and XMLATTRIBUTES SQL/XML Functions
- XMLFOREST SQL/XML Function
- XMLCONCAT SQL/XML Function
- XMLAGG SQL/XML Function
- XMLPI SQL/XML Function
- XMLCOMMENT SQL/XML Function
- XMLSERIALIZE SQL/XML Function
- XMLPARSE SQL/XML Function
- XMLROOT Oracle SQL Function
- XMLCOLATTVAL Oracle SQL Function
- XMLCDATA Oracle SQL Function
- Generating XML using DBMS_XMLGEN
- SYS_XMLGEN Oracle SQL Function
- SYS_XMLAGG Oracle SQL Function
- Guidelines for Generating XML with Oracle XML DB
- 19 XMLType Views
- What Are XMLType Views?
- Creating Non-Schema-Based XMLType Views
- Creating XML Schema-Based XMLType Views
- Creating XMLType Views from XMLType Tables
- Referencing XMLType View Objects using SQL Function REF
- DML (Data Manipulation Language) on XMLType Views
- 20 Accessing Data Through URIs
- 18 Generating XML Data from the Database
- Part V Oracle XML DB Repository
- 21 Accessing Oracle XML DB Repository Data
- Overview of Oracle XML DB Repository
- Repository Terminology and Supplied Resources
- Oracle XML DB Repository Resources
- Navigational or Path Access to Repository Resources
- Query-Based Access to Repository Resources
- Servlet Access to Repository Resources
- Operations on Repository Resources
- 22 Configuring Oracle XML DB Repository
- 23 Using XLink and XInclude with Oracle XML DB
- Overview of XLink and XInclude
- XLink and XInclude Link Types
- XInclude: Compound Documents
- Using XLink with Oracle XML DB
- Using XInclude with Oracle XML DB
- Examining XLink and XInclude Links using DOCUMENT_LINKS View
- Configuring Resources for XLink and XInclude
- Configuring Treatment of Unresolved Links: UnresolvedLink Attribute
- Configuring the Document Links to Create: LinkType Element
- Configuring the Path Format for Retrieval: PathFormat Element
- Configuring Conflict-Resolution for XInclude: ConflictRule Element
- Configuring Decomposition of Documents using XInclude: SectionConfig Element
- XLink and XInclude Configuration Examples
- Managing XLink and XInclude Links using DBMS_XDB.processLinks
- 24 Managing Resource Versions
- 25 Accessing the Repository using RESOURCE_VIEW and PATH_VIEW
- 26 Accessing the Repository using PL/SQL
- 27 Repository Access Control
- Access Control Concepts
- Database Privileges for Repository Operations
- Privileges
- ACLs and ACEs
- Working with Access Control Lists (ACLs)
- Creating an ACL using DBMS_XDB.CREATERESOURCE
- Retrieving an ACL Document, Given its Repository Path
- Setting the ACL of a Resource
- Deleting an ACL
- Updating an ACL
- Retrieving the ACL Document that Protects a Given Resource
- Retrieving Privileges Granted to the Current User for a Particular Resource
- Checking Whether the Current User Has Privileges on a Resource
- Checking Whether a User Has Privileges using 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
- ACL Caching
- Repository Resources and Database Table Security
- Integrating Oracle XML DB with LDAP
- 28 Accessing the Repository using Protocols
- Overview of Oracle XML DB Protocol Server
- Oracle XML DB Protocol Server Configuration Management
- Using FTP and Oracle XML DB Protocol Server
- Oracle XML DB Protocol Server: FTP Features
- FTP Features That Are Not Supported
- Supported FTP Client Methods
- FTP Quote Methods
- Using FTP with Oracle ASM Files
- Using FTP on the Standard Port Instead of the Oracle XML DB Default Port
- Using IPv6 IP Addresses with FTP
- FTP Server Session Management
- Handling Error 421. Modifying the Default Timeout Value of an FTP Session
- FTP Client Failure in Passive Mode
- Oracle XML DB Protocol Server: FTP Features
- Using HTTP(S) and Oracle XML DB Protocol Server
- Oracle XML DB Protocol Server: HTTP(S) Features
- HTTP(S) Features That Are Not Supported
- Supported HTTP(S) Client Methods
- Using HTTP(S) on a Standard Port Instead of an Oracle XML DB Default Port
- Using IPv6 IP Addresses with HTTP(S)
- HTTPS: Support for Secure HTTP
- Controlling URL Expiration Time
- Anonymous Access to Oracle XML DB Repository using HTTP
- Using Java Servlets with HTTP(S)
- Embedded PL/SQL Gateway
- Sending Multibyte Data From a Client
- Characters That Are Not ASCII in URLs
- Controlling Character Sets for HTTP(S)
- Oracle XML DB Protocol Server: HTTP(S) Features
- Using WebDAV and Oracle XML DB
- 29 User-Defined Repository Metadata
- 30 Oracle XML DB Repository Events
- 31 Using Oracle XML DB Content Connector
- Overview of JCR and Oracle XML DB Content Connector
- How Oracle XML DB Repository Is Exposed in JCR
- How to Use Oracle XML DB Content Connector
- Setting CLASSPATH
- Obtaining the JCR Repository Object
- Sample Code to Upload File
- Additional Code Samples
- Logging API for Oracle XML DB Content Connector
- Supported JCR Compliance Levels
- Oracle XML DB Content Connector Restrictions
- Default Workspace Name
- Operations Restricted to Specific Node Types
- Determining the State of Files or Folders
- Interaction Between Binary and XML Content
- Order in Which Changes Are Saved
- Undefined Properties
- Node Type nt:base Is Abstract
- Node jcr:content Is Created Automatically
- Saving Normalizes Node jcr:xmltext
- Node Type mix:referenceable
- Full-Text Indexing
- Using XML Schemas with JCR
- 32 Writing Oracle XML DB Applications in Java
- Overview of Oracle XML DB Java Applications
- Design Guidelines: Java Inside or Outside the Database?
- Writing Oracle XML DB HTTP Servlets in Java
- Configuring Oracle XML DB Servlets
- HTTP Request Processing for Oracle XML DB Servlets
- Session Pool and Oracle XML DB Servlets
- Native XML Stream Support
- Oracle XML DB Servlet APIs
- Oracle XML DB Servlet Example
- 33 Using Native Oracle XML DB Web Services
- 21 Accessing Oracle XML DB Repository Data
- Part VI Oracle Tools that Support Oracle XML DB
- 34 Administering Oracle XML DB
- Installing Oracle XML DB
- Upgrading an Existing Oracle XML DB Installation
- Administering Oracle XML DB using Oracle Enterprise Manager
- Configuring Oracle XML DB using xdbconfig.xml
- Oracle XML DB Configuration File, xdbconfig.xml
- <xdbconfig> (Top-Level Element)
- <sysconfig> (Child of <xdbconfig>)
- <userconfig> (Child of <xdbconfig>)
- <protocolconfig> (Child of <sysconfig>)
- <httpconfig> (Child of <protocolconfig>)
- <servlet> (Descendant of <httpconfig>)
- Oracle XML DB Configuration File Example
- Oracle XML DB Configuration API
- Configuring Default Namespace to Schema Location Mappings
- Configuring XML File Extensions
- Oracle XML DB Configuration File, xdbconfig.xml
- Package DBMS_XDB_ADMIN
- 35 Loading XML Data using SQL*Loader
- 36 Exporting and Importing XMLType Tables
- 37 Exchanging XML Data using Oracle Streams AQ
- How Do AQ and XML Complement Each Other?
- Oracle Streams and AQ
- XMLType Attributes in Object Types
- Internet Data Access Presentation (iDAP)
- iDAP Architecture
- 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
- 34 Administering Oracle XML DB
- Part VII Appendixes
- A Oracle-Supplied XML Schemas and Examples
- XDBResource.xsd: XML Schema for Oracle XML DB Resources
- XDBResConfig.xsd: XML Schema for Resource Configuration
- acl.xsd: XML Schema for ACLs
- xdbconfig.xsd: XML Schema for Configuring Oracle XML DB
- xdiff.xsd: XML Schema for Comparing Schemas for In-Place Evolution
- Purchase-Order XML Schemas
- XSL Style Sheet Example, PurchaseOrder.xsl
- Loading XML Data using C (OCI)
- Initializing and Terminating an XML Context (OCI)
- B Oracle XML DB Restrictions
- A Oracle-Supplied XML Schemas and Examples
- Index