Chapter 15
630
This basically formats the XML data in a simple tabular format. We can try it out and see the result with
the URL:
http://localhost:8080/vacserv/jsp/IE5xslt.jsp
You should see a result similar to the one below:
If you try the example with any version of the Netscape browser, you will notice that none of the XML
data will be formatted properly. In fact, if we simply want to display of the XML data on IE 5 browsers,
we do not even need to write an XSLT stylesheet. There is built-in support for the formatting of an
XML data island.
XML Data Island Support
What Microsoft calls "XML data islands" are actually XML document(s) embedded within the flow of
HTML. There is a special <XML> tag in Internet Explorer's HTML dialect to support this. We have
created a JSP page to demonstrate this capability. Here is IE5island.jsp from the
projavaxml\vacserv\jsp directory:
<%@ page language="java" import="com.wrox.pjxml.DealsFinder" %>
<%!
public DealsFinder myFinder;
public void jspInit() {
myFinder = new DealsFinder();
myFinder.init();
}
%>
<HTML><HEAD></HEAD><TITLE></TITLE>
<BODY>
<XML ID="vacDeals">
<%