Database Application Architecture
The application accesses the database directly from the XSLT stylesheet
as seen from the application developer's viewpoint. Full transactional
access can be controlled directly from the stylesheet by simply selecting
an SQL statement that has been stored in an XML document. Under the hood,
the Xpath document() function is used to read a secondary document into
the stylesheet. This document() function takes a protocol specifier so
you can request a document from an HTTP source, not just the local file
system.
By using the HTTP protocol for the document to be read into the stylesheet,
it is possible to call another servlet. That servlet can be accessed over
the network . Alternately, you can access another servlet that is running
in the same application server that is hosting the servlet that is running
the XSLT transform engine.
The HTTP request also carries an HTTP query string that contains the
actual SQL statement along with SQL prepared statement parameters and
parameter types. The application developer does not need to hand code
that HTTP query string. All the information that is embedded in it comes
from a template that reads the XML document that contains all the queries
for the application. The result is that all the SQL is stored and accessed
in a single file that can be edited by the database developer and never
needs to be seen by the web page developer.
Here is an overview of how the components work together to do the database
access. This diagram is a simplification that only shows the major components.
You can download the stylesheets that contain the actual code used in
the sample database application from the SourceForge
project

Top |