spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / xml / column81

XML Features of Oracle 8i and 9i

Developer News
Mandrake Linux Founder Back, Virtually
Amazon: We're a Technology Company
Sun Expands MySQL With Closed Source

XSQL servlet

XSQL servlet - as distinct from the XSU described above - is a tool that processes SQL queries and outputs the result set as XML. As a standard java servlet it should work with any java enabled web server. As input it uses an "XSQL" file: an XML file containing embedded SQL queries. XSQL pages are similar to ASPs/JSPs but give XML as output and allow for standard XML processing using XSL.

Example XSQL file:

<?xml version="1.0"?>
<xsql:query connection="demo" xmlns:xsql="urn:oracle-xsql">
  SELECT Carrier, FlightNumber, Origin, ExpectedTime
  FROM FlightSchedule
  WHERE Destination = '{@City}'
</xsql:query>

Called via:

http://mywebserver/flights.xsql?City=LHR

Would result in this output:

<?xml version="1.0"?>
<ROWSET>
  <ROW num="1">
    <CARRIER>LH</CARRIER>
    <FLIGHTNUMBER>LH343</FLIGHTNUMBER>
    <ORIGIN>London</ORIGIN>
    <DUE>12:44</DUE>
  </ROW>
  <ROW num="2">
    <CARRIER>BA</CARRIER>
    <FLIGHTNUMBER>BA272</FLIGHTNUMBER>
    <ORIGIN>Birmingham</ORIGIN>
    <DUE>02:05</DUE>
  </ROW>
</ROWSET>

But XSQL pages can also contain references to stylesheets such as:

<?xml-stylesheet type="text/xsl" href="flight-list.xsl"?>

to convert the above into HTML or other formats.

Other features of XSQL pages:

XSQL servlet can be called in different ways:

Next is the XML class generator...


Produced by Michael Claßen

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

webref The latest from WebReference.com Browse >
Administering RBAC in PHP 5 CMS Framework · xref: Automatic Cross Referencing Script · Book Review: Content Rich
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
MS Access and MySQL · Cisco AutoQoS: VoIP QoS for Mere Mortals · While VoIP Adoption Explodes in Enterprise, Carrier Spending Lags

URL: http://www.webreference.com/xml/column81/4.html
Created: May 10, 2003
Revised: May 10, 2003