Oracle8i Application Developer's Guide - XML
Release 3 (8.1.7)

Part Number A86030-01


Solution Area



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

Using XML Parser for PL/SQL, 5 of 7

Using the XML Parser for PL/SQL: XSL-T Processor (DOM Interface)

Extensible Stylesheet Language Transformation, abbreviated XSLT (or XSL-T), describes rules for transforming a source tree into a result tree. A transformation expressed in XSLT is called a stylesheet.

The transformation specified is achieved by associating patterns with templates defined in the stylesheet. A template is instantiated to create part of the result tree.

This PLSQL implementation of the XSL processor follows the W3C XSLT working draft (rev WD-xslt-19990813) and includes the required behavior of an XSL processor in terms of how it must read XSLT stylesheets and the transformations it must effect.

The types and methods described in this document are made available by the PLSQL package, xslprocessor().

Figure 24-2 shows the XML Parser for PL/SQL XSL-T Processor main functionality.

  1. The Process Stylesheet process receives input from the XML document and the selected Stylesheet which m,ay or may nto be indicated in the XML document. Bot the stylesheet and the XML document can be any of the following types:

    • File name

    • Varchar buffer

    • CLOB

    The XML document can be input 1 through n times.

  2. The parsed XML document inputs XSLProcessor.processXSL(xslstylesheet,xml instance) procedure, where:

    • XML document is indicated in the "xml instance" argument

    • Stylesheet input is indicated in the "xslstylesheet" argument

  3. Build the stylesheet using the Stylesheet input to the XSLStylesheet() procedure. The following methods are available for this procedure:

    • removeParam()

    • resetParam()

    • setParam()

    This produces a stylesheet object which then inputs the "Process Stylesheet" step using procedure, XSLProcessor.processXSL(xslstylesheet,xml instance).

  4. The "Process stylesheet" process can be repeated 1 through n times. In other words, the same stylesheet can be applied to multiple parsed XML documents to transform them wither into an XML document, HTML document, or other text based format.

  5. The resulting parsed and transformed document is output either as a stream or a DOM document.

  6. When the XSL-T process if complete, call the freeProcessor() procedure to free up any temporary structures and the XSLProcessor procedures used in the XSL transformation process.

Figure 24-2 "XML Parser for PL/SQL: XSL-T processor (DOM Interface)

XML Parser for PL/SQL: XSLT Processor -- Default Behavior

The following is the default behavior for the XML Parser for PL/SQL XSLT Processor:

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

All Rights Reserved.


Solution Area