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

Part Number A86030-01

Library

Solution Area

Contents

Index

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

Using XSQL Servlet, 21 of 24


Defining Custom XSQL Action Element for your Handler

For additional convenience, you can define entries in the XSQLConfig.xml file that associate an action element name and a handler class. So, for example, in the default XSQLConfig.xml file shipped with Oracle XSQL Pages, you'll see:

<actiondefs>
   <action>
     <elementname>param</elementname>
<handlerclass>oracle.xml.xsql.actions.ExampleGetParameterHandler</handlerclass>
     </action>
     <action>
       <elementname>current-date</elementname>
<handlerclass>oracle.xml.xsql.actions.ExampleCurrentDBDateHandler</handlerclass>
     </action>
     </actiondefs>

These entries in the config file allow a page to use:

<xsql:param name="myparam"/>

instead of the more verbose:

<xsql:action handler="oracle.xml.xsql.actions.ExampleGetParameterHandler"
                    name="myparam"/>

and similarly

<xsql:current-date/>

instead of the more verbose:

<xsql:action handler="oracle.xml.xsql.actions.ExampleDBDateHandler"/>


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

All Rights Reserved.

Library

Solution Area

Contents

Index