Building Oracle XML Applications

Book description

This rich and detailed look at the many Oracle tools that support XML development shows Java and PL/SQL developers how to combine the power of XML and XSLT with the speed, functionality, and reliability of the Oracle database. The nearly 800 pages of entertaining text, helpful and time-saving hints, and extensive examples can be put to use immediately to build custom XML applications. Includes a CD-ROM with JDeveloper 3.1, an integrated development environment for Java developers.

Publisher resources

Download Example Code

Table of contents

  1. Building Oracle XML Applications
    1. Preface
      1. Audience for This Book
      2. Which Platform and Version?
      3. Structure of This Book
      4. About the Examples
      5. About the CD-ROM
      6. Conventions Used in This Book
      7. Comments and Questions
      8. Acknowledgments
    2. I. XML Basics
      1. 1. Introduction to XML
        1. What Is XML?
          1. Extensible Markup Language
          2. XML Specification
          3. Document Type Definition
        2. What Can I Do with XML?
          1. Work with XML Using Text-Based Tools
          2. Edit XML Using DTD-Aware Editors
          3. Send and Receive XML over the Web
          4. Generate XML with Server-Side Programs
          5. Work with Specific XML Vocabularies
          6. Parse XML to Access Its Information Set
          7. Manipulate XML Using the DOM
          8. Query XML Using XPath
          9. Transform XML Using XSLT
        3. Why Should I Use XML?
          1. XML Enables a Data Web of Information Services
          2. XML Simplifies Application Integration
          3. XML Simplifies Information Publishing and Reuse
        4. What XML Technologies Does Oracle Provide?
          1. Oracle XML Parser
          2. Oracle XSLT Processor
          3. Oracle XML SQL Utility
          4. Oracle XSQL Pages XML Publishing Framework
          5. Oracle8 XML-Enabled Object Views
          6. Oracle8i JServer Java Virtual Machine
          7. Oracle interMedia
          8. Oracle JDeveloper IDE
          9. Oracle Advanced Queuing
          10. Oracle PLSXML Utilities
      2. 2. Working with XML
        1. Creating and Validating XML
          1. Creating Your Own XML Vocabularies
          2. Checking Your XML Document’s Syntax
          3. Validating Your XML Against a DTD
        2. Modularizing XML
          1. Including Text and External Resources
          2. Using Namespaces to Mix XML Vocabularies
        3. Searching XML with XPath
    3. II. Oracle XML Fundamentals
      1. 3. Combining XML and Oracle
        1. Hosting the XML FAQ System on Oracle
        2. Serving XML in Any Format
        3. Acquiring Web-based XML Content
      2. 4. Using JDeveloper for XML Development
        1. Working with XML, XSQL, and JSP Files
          1. Performing Basic Project and File Manipulation
          2. Doing Color-Coded XML, XSL, XSQL, and JSP Editing
          3. Interactively Syntax Checking XML-based Files
          4. Developing XSQL Pages and JSPs Using JDeveloper
          5. Understanding Project Path Settings
        2. Working with Database Objects
          1. Creating the XMLBOOK User to Run the Examples
          2. Defining and Browsing Database Connections
        3. Using JDeveloper with Oracle XDK Components
          1. Adding Oracle XDK Libraries to Your Project
          2. Using JDeveloper Coding Productivity Features
          3. Final Observations
      3. 5. Processing XML with PL/SQL
        1. Loading External XML Files
        2. Parsing XML
          1. Installing Oracle XML Parser for PL/SQL
          2. Parsing XML from a CLOB
          3. Parsing XML from a String
          4. Parsing XML from a URL
          5. PL/SQL Helper Packages for XML Parsing
        3. Searching XML Documents with XPath
          1. Basic Use of XPath in PL/SQL
          2. Using XPath for Custom XML-to-Table Mapping
          3. Using XPath Expressions as Validation Rules
        4. Working with XML Messages
          1. Sending and Receiving XML Between Servers
          2. Handling Asynchronous XML Messages in Queues
        5. Producing and Transforming XML Query Results
          1. Installing the XML SQL Utility and XSLT Processor
          2. Producing XML from SQL Queries
          3. Transforming XML Using XSLT
      4. 6. Processing XML with Java
        1. Introduction to Oracle8i JServer
          1. What Is JServer?
          2. Connecting to the Database in Java
          3. Reading XML from and Writing XML to CLOBs
        2. Parsing and Programmatically Constructing XML
          1. Installing Oracle XML Parser for Java
          2. Parsing XML from Files, Streams, and Strings
          3. Simplifying CLOB-based XML Parsing
          4. Deploying and Debugging Stored Procedures
          5. Constructing XML from Ill-Formed HTML Input
          6. Handling Very Large XML Data Streams
        3. Searching XML Documents with XPath
          1. Basic Use of XPath in Java
          2. Using XPath for Reading Configuration Files
          3. Using XPath Expressions as Validation Rules
        4. Working with XML Messages
          1. Sending and Receiving XML Between Servers
          2. Acquiring XML Data from Another Server
          3. Handling Asynchronous XML Messages in Queues
        5. Producing and Transforming XML Query Results
          1. Installing XML SQL Utility and XSLT Processor
          2. Producing XML from SQL Queries
          3. Transforming XML Using XSLT
      5. 7. Transforming XML with XSLT
        1. XSLT Processing Mechanics
        2. Single-Template Stylesheets
        3. Understanding Input and Output Options
        4. Improving Flexibility with Multiple Templates
          1. Using Multiple Templates
          2. Understanding Built-in Templates
          3. Wildcard Matching and Whitespace Handling
          4. Processing Source Nodes in Different Modes
          5. Reusing and Customizing Existing Stylesheets
          6. Avoiding Template Conflicts with Priorities
          7. Creating Reusable Named Templates
      6. 8. Publishing Data with XSQL Pages
        1. Introduction to XSQL Pages
          1. Your First XSQL Page
          2. Defining Your Database Connections Settings
          3. Using Parameters in Your Queries
          4. Customizing the XSQL Results
            1. Changing element names by aliasing columns
            2. Tailoring XML query results
            3. Using parameters in <xsql:query> tag attributes
          5. Using Multiple Queries on a Page
          6. Producing XML from SQL with Nested Structure
            1. Using user-defined object types
            2. Using the CURSOR operator for nested rowsets
          7. Providing a Fallback Query
        2. Transforming XSQL Page Results with XSLT
          1. Associating a Stylesheet with an XSQL Page
          2. Using a Stylesheet to Produce HTML
          3. Using a Stylesheet to Produce a Datagram
          4. Using a Stylesheet on Static XML Documents
          5. Offline Publishing of XSQL Pages
        3. Troubleshooting Your XSQL Pages
          1. Common Problems for XSQL Pages with No Stylesheet
          2. Common Problems for Pages with a Stylesheet
          3. Summary of Basic Error Messages
      7. 9. XSLT Beyond the Basics
        1. Using XSLT Variables
          1. What Are XSLT Variables?
          2. Assigning a Variable a Computed Value
          3. Conditionally Assigning Variable Values
          4. Copying Variables to the Result Tree
        2. The Talented Identity Transformation
          1. Renaming and Suppressing Elements
          2. Adding and Stripping Whitespace
          3. Converting Between Elements and Attributes
          4. Annotating Elements in the Source Tree
          5. Performing Value Lookups
        3. Grouping Repeating Data Using SQL
          1. Multilevel Grouping with CURSOR Expressions
          2. Formatting Grouped Data into HTML
        4. Sorting and Grouping Repeating Data with XSLT
          1. Sorting on Element or Attribute Values
          2. Grouping by Scanning Preceding Elements
          3. Faster Grouping Using XSL Keys
      8. 10. Generating Datagrams with PL/SQL
        1. Programmatically Generating XML Using PL/SQL
          1. Organization of PL/SQL Code
          2. Formatting Data for Output Using PL/SQL
            1. Hello World example in PL/SQL
            2. Processing database query results in PL/SQL
          3. Formatting Database Data for the Web
            1. The Oracle Web Agent PL/SQL packages
            2. Returning an HTML page of stock quotes
          4. Formatting Database Data in XML Using PL/SQL
            1. Returning an XML stock quote datagram
        2. Automatic XML Generation with DBXML
          1. Letting DBXML Do the Work for You
          2. Returning XML Information for Multiple Tables
          3. Controlling How the XML Is Generated
      9. 11. Generating Datagrams with Java
        1. Generating XML Using Java
          1. Generating XML with JDBC
          2. Generating XML with SQLJ
        2. Serving XML Datagrams over the Web
          1. Serving Datagrams Using Java Servlets
          2. Serving Datagrams with JavaServer Pages
        3. Automatic XML from SQL Queries
          1. Using OracleXMLQuery to Do the Work for You
          2. Controlling How the XML Is Generated
      10. 12. Storing XML Datagrams
        1. Overview of XML Storage Approaches
        2. Loading Datagrams with the XML SQL Utility
          1. Transforming Datagrams for Insertion
          2. A Slightly More Complicated Storage Example
          3. Using Object Types and Object Views for XML
          4. Using Object Types and Object Views for Insert
          5. Inserting Nested, Repeating Information
          6. Inserting Datagrams with Document Fragments
        3. Storing Posted XML Using XSQL Servlet
          1. Storing Posted XML Using XSQL Pages
          2. Posting and Inserting HTML Form Parameters
        4. Inserting Datagrams Using Java
          1. Inserting Arbitrary XML Using Java
          2. Using XPath Expressions to Insert Data
      11. 13. Searching XML with interMedia
        1. Why Use interMedia?
        2. What Is interMedia?
          1. Using the Autosectioner
        3. The interMedia Query Language
          1. The WITHIN Operator
          2. Combined WITHIN Clauses
          3. Nested WITHIN Clauses
          4. Namespaces
          5. Attribute Value Searching
          6. Mixing CONTAINS and SQL Predicates
        4. Handling Heterogeneous Doctypes
          1. Using the XML Sectioner
          2. Attribute Value Searching
        5. Handling Doctype Evolution
        6. Advanced interMedia
      12. 14. Advanced XML Loading Techniques
        1. Storing Datagrams in Multiple Tables
        2. Building an XMLLoader Utility
        3. Creating Insert Transformations Automatically
    4. III. Oracle XML Applications
      1. 15. Using XSQL Pages as a Publishing Framework
        1. Overview of XSQL Pages Facilities
          1. Understanding XSQL Page Processing
          2. Overview of Built-in XSQL Page Actions
          3. Working with Parameters
            1. Setting private page-level parameters
            2. Setting HTTP session variables
            3. Setting HTTP cookie values
            4. Setting XSLT stylesheet parameters
          4. Supported Sources of XML Content
            1. Including parameter values
            2. Including all request parameters
            3. Including encapsulated, dynamic queries
            4. Including external XML resources by URL
            5. Including dynamic XML from PL/SQL
            6. Modularizing reusable XML information content
          5. Modifying the Database Using Submitted Data
            1. Doing DML or executing PL/SQL
            2. Handling posted HTML forms and XML documents
          6. Accessing XSQL Pages from JSP
          7. Requesting XSQL Pages Programmatically
        2. Additional XML Delivery Options
          1. Optimizing Presentation for Requesting Device
          2. Supplying a Stylesheet in the Request
          3. Controlling Media Type of the Returned Page
          4. Detecting and Formatting Errors
      2. 16. Extending XSQL and XSLT with Java
        1. Developing Custom XSQL Actions
          1. How Action Handlers Work
          2. Writing Your Own Custom XSQL Action Handler
          3. Using Custom XSQL Action Handlers in a Page
          4. Debugging Action Handlers
          5. Deploying Custom Action Handlers
        2. Integrating Custom XML Sources
        3. Working with XSLT Extension Functions
          1. Using Existing Java Classes as Extensions
          2. Formatting Rainbow-Colored SVG with XSLT
          3. Writing Your Own Java Extension Functions
          4. Debugging Your XSLT Java Extension Functions
      3. 17. XSLT-Powered Portals and Applications
        1. XSLT-Powered Web Store
          1. Turning HTML Mockup into an XSLT stylesheet
          2. Building an XSQL Page to Assemble Data
          3. Plugging Dynamic Data into the Stylesheet
          4. Formatting Numbers and Conditional Formatting
          5. Handling Raw HTML/XML from Database Columns
          6. Factoring Reusable Transformation Routines
        2. Building a Personalized News Portal
          1. News Category Paging Example
          2. Building Reusable HTML Widgets
          3. Creating a Personalized News Portal
          4. Separating Structure and Style of Forms
          5. Updating User Preferences
        3. Online Discussion Forum
          1. Building an Online Discussion Forum
          2. Completely Abstracting Page Structure
          3. Modularizing the Site Look and Feel
          4. Overriding Formatting for Certain Columns
          5. Using Recursive Named Templates
          6. Reusing Templates to Generate Forms
          7. Dynamic Queries Using Ref Cursors
          8. Unifying Our News Portal and Discussion Forum
    5. IV. Appendixes
      1. A. XML Helper Packages
        1. Installing the XML Helper Packages
        2. Source Code for the XML Helper Packages
          1. The xml Package
          2. The xmldoc Package
          3. The xpath Package
          4. The xslt Package
          5. The http Package
      2. B. Installing the Oracle XSQL Servlet
        1. Supported Configurations
          1. Supported Java JDK Versions
          2. Supported Servlet Engines
          3. Supported JSP Implementations
          4. JDBC Drivers and Databases
        2. Prerequisites
        3. Downloading and Installing the XSQL Servlet
          1. Obtaining the XSQL Servlet Software from the Oracle Technology Network (OTN)
          2. Extracting the Files in the Distribution
          3. Starting the Web-to-Go Server ( Windows Only)
          4. Setting Up the Database Connection Definitions for Your Environment
          5. Setting Up Your Servlet Engine to Run XSQL Pages
            1. Allaire JRun 2.3.3
            2. Apache JServ 1.0 or 1.1
            3. Jakarta Tomcat 3.1
            4. ServletExec 2.2
          6. Setting Up the Demo Data
      3. C. Conceptual Map to the XML Family
      4. D. Quick References
    6. Index
    7. Colophon

Product information

  • Title: Building Oracle XML Applications
  • Author(s):
  • Release date: October 2000
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781565926912