12 The XML Files: Develo pment of XML/XSL A pplications Using WebS phere Studio
Presently, Web services theoretically need to support a multitude a browsers.
The data sent to the browsers would be common to all, but the presentation of
the data could be dependent on the browser. In effect, the presentation o f the
data could be PDA or even a mobile phone.
An XSLT stylesheet is a XML document. A XSLT processor transforms one or
more XSLT stylesheets. Typically, in a Java and XSLT based Web application,
Java is used to access the data from the database. XML data is then generated
dependent on the data. With the latest release in database technologies, some
databases have now the ability to export the dat a into XML. However, usually
programmers write the code to extract the data and convert it into XML.
The processes takes the XML file as one input, an d the XSLT stylesheet as the
second input, and produces a third output, which is usually HTML, but could be
another XML document. The XML file has the da ta to be presented while the
XSLT stylesheet details the logic of how the output data is to be presented.
Figure 1-1 XSLT and Web applications
A Web application is an application with its presentation layer (or user interface)
on the World Wide Web. These applications display graphics, text, and
animation. It tends to be custom made and uses a host of technologies like
browsers, databases, and programming languages to name a few. Because of
the number of technologies and the skills sets required of its designers and
developers, Web applications have to be modular. While the graphic designer
concentrates on the HTML user interface, the database programmer focuses on
extracting the correct data. A Java programmer might be working on the Web tier.
HTML XML Data
XSLT
Processor
XSLT StyleSheet
Presentation Logic
Database
Presentation Data
Web Ti er
Web Browser