O'Reilly logo

Building Oracle XML Applications by Steve Muench

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. Publishing Data with XSQL Pages

Once you discover the advantages of working with database information in XML, you’ll find yourself building XML datagrams from SQL statements for many common tasks. In addition to providing XML components that simplify this job for developers, Oracle has anticipated a much broader interest in serving database-driven XML, and has provided an easier route for non-programmers. Using Oracle’s XSQL Pages facility, anyone who is familiar with SQL can quickly and easily build XML data pages from easy-to-author templates.

Introduction to XSQL Pages

XSQL pages are templates in *.xsql files that allow anyone familiar with SQL to declaratively:

  • Assemble dynamic XML “data pages” based on one or more parametrized SQL queries

  • Transform a data page to produce a final result in any desired XML, HTML, or text-based format using an associated XSLT stylesheet

These templates are processed by a common XSQL page processor engine shared by the XSQL Servlet, the XSQL command-line utility, and the programmatic API for processing XSQL pages called the XSQLRequest class, as shown in Figure 8.1.

Overview of XSQL Pages architecture

Figure 8-1. Overview of XSQL Pages architecture

As this chapter will illustrate, you can accomplish surprising things in a declarative way by combining SQL, XML, and XSLT.

Tip

As part of the Oracle XML Developer’s Kit, Oracle XSQL Pages is included in Oracle JDeveloper 3.1 and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required