Client-Side Presentation Logic
627
Once the compilation is successful, close any browser with the applet displayed this will ensure the
applet's max trip number is consistent during our test. You can start the TestTool using the same
command-line window above:
java TestTooljava
Using this tool, we can simulate the arrival of new sell-off information from tour operators and travel
wholesalers for our system. Follow this sequence:
q
Clicking the Purge Data button to clean the database
q
Starting up our end-to-end system, and clicking Update you will see that no trips are displayed
q
Clicking the Inject 1st set button to inject the first set of data from the data1.xml file into
the database
q
Clicking on the Update button on the end-to-end system, to display the set of data
q
Clicking the Inject 2nd set button to inject the second set of data from the data2.xml file
into the database
q
Clicking on the Update button on the end-to-end system to display the new set of data
To confirm that indeed only the newly arrived sell-off list is transmitted between the client and the
server, you may want to set up the HTTP Tunneling Monitor program (detailed in Chapter 19). This
utility will give you an X-ray view of the XML-based traffic that actually flows between the client and
the server.
This concludes our examination of client-side XML filtering and processing enabled by a fully-fledged
Java applet and SAX2 parser. We will now check out some of the built-in XML-handling features of the
modern day browsers - and see how they may be used for client-side XML presentation.
Built-in XML Presentation Capabilities of Modern
Browsers
For most practical intents and purposes, we are talking about either the Netscape
Communicator/Navigator or Microsoft's Internet Explorer when we talk about client-side browsing.
Surprisingly enough, native support for XML formatting is a relatively recent feature enhancement for
both lines of browsers.
Internet Explorer 4.x and 5.x XML Presentation Support
Microsoft has supported the formatting and viewing of XML documents since version 4.x of its
browsers. More recently, full XSLT is supported by MSXML. msxml.dll is a C++ implementation of
XML and XSLT parsing library that IE 5 depends on; it can also be used by third party developer to
perform the same tasks.