Oracle8i Application Developer's Guide - XML Release 3 (8.1.7) Part Number A86030-01 |
|
Using XSQL Servlet, 17 of 24
Figure 19-9 shows you how the XSQL Page Processor processes the actions specified in the ActionHandlers.
init(Element action Elt, XSQLPageRequest context)
Errors raised by the processing of any XSQL Action Elements are reported as XML elements in a uniform way so that XSL Stylesheets can detect their presence and optionally format them for presentation.
The action element in error will be replaced in the page by:
<xsql-error action="xxx">
Depending on the error the <xsql-error> element contains:
Here is an example of an XSLT stylesheet that uses this information to display error information on the screen:
<xsl:if test="//xsql-error"> <table style="background:yellow"> <xsl:for-each select="//xsql-error"> <tr> <td><b>Action</b></td> <td><xsl:value-of select="@action"/></td> </tr> <tr valign="top"> <td><b>Message</b></td> <td><xsl:value-of select="message"/></td> </tr> </xsl:for-each> </table> </xsl:if>
If your stylesheet uses an <xsl:output> element, the XSQL Page Processor infers the media type and encoding of the returned document from the media-type and encoding attributes of <xsl:output>.
JavaServer Pages (JSP) can use <jsp:forward> to forward to an XSQL Page and <jsp:include> to include the results of an XSQL Page.
Attributes of the <xsql:query> tag (or any action element) can reference parameters in the same way the SQL statement for the tag can, allowing the client to pass in values for parameters like skip-rows or any other.
Client-overriding of stylesheets for an XSQL Page can be disallowed with the new allow-client-style="no" on the document element of the page.
|
![]() Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|