Downloading the XML and XSL documents to the client for processing also makes them available to the client's cache. So, if other processes or situations reuse these files, the data will not have to be reloaded from the server. If you do not want to use the XSQL Servlet, you can use these products within your own Java servlet or application to achieve the same results. The following figure illustrates this approach. Here, a Java Servlet, JavaServer Page, or other mechanism generates a Web form.
Users enter queries and parameters in the form and submit the request.
The form sends the data as an XML string to the middle-tier or Java servlet, which parses the queries, data, and any URL parameters. Within the application, the XML Parser passes queries on to the XML SQL Utility, which queries the database. The utility then passes the query results to the XSLT Processor for formatting. The XSL stylesheet that is used can be based on user preferences, the kind of client making the request, the kinds of queries performed, and so on. The XSLT Processor formats the XML results and presents it to the client.