Oracle8i Application Developer's Guide - XML
Release 3 (8.1.7)

Part Number A86030-01

Library

Product

Contents

Index

Go to previous page Go to beginning of chapter Go to next page

Customizing Discoverer 3i Viewer with XSL, 9 of 9


Frequently Asked Questions (FAQs): Discoverer 3i Viewer

Explaining Servlets

Question

What is a servlet?

Answer

Servlets are modules of Java code that run in a server application (hence the name "Servlets", similar to "Applets" on the client side) to answer client requests. Servlets are not tied to a specific client-server protocol but they are most commonly used with HTTP and the word "Servlet" is often used in the meaning of "HTTP Servlet".

Servlets make use of the Java standard extension classes in the packages javax.servlet (the basic Servlet framework) and javax.servlet.http (extensions of the Servlet framework for Servlets that answer HTTP requests). Since Servlets are written in the highly portable Java language and follow a standard framework, they provide a means to create sophisticated server extensions in a server and operating system independent way.

Typical uses for HTTP Servlets include:

How Discoverer 3i Viewer Communicates with Browsers

Question

What does Discoverer 3I Viewer use to communicate with the user's browser?

Answer

HTTP and HTML.

Why HTML is Output to the Browser

Question

Why does Discoverer 3i Viewer only output HTML to the user's browser?

Answer

Discoverer 3i Viewer outputs 100% HTML so that it can support the widest possible range of browsers. Using this architecture also avoids the need for an end user to perform an install or download.

Discoverer 3i Viewer and XML

Question

How is XML used by Discoverer 3I Viewer?

Answer

XML is generated by the middle-tier and represents the application state. Discoverer 3iViewer Servlet interprets an HTTP request from the user's browser, and makes the necessary calls to the Discoverer Server.

The server response is represented in XML generated by the Servlet. XSL is applied to this XML, producing the HTML that is displayed by the users browser.

By using XML and XSL together, the underlying data and the look and feel are separated allowing easy customization.

disco3iv.xml

Question

What does the disco3iv.xml file do?

Answer

You can use disco3iv.xml file to configure various options to make Discoverer 3i Viewer behave the way you want to. For example, you can specify the Discoverer Session that it should connect to.

XSL

Discoverer 3i and XSL

Question

How is XSL used by Discoverer 3i Viewer?

Answer

Discoverer 3I Viewer uses XSL (or more specifically XSL-T) to transform the XML generated by the middle-tier into the HTML that is sent to the user's browser. By editing the XSL files, you gain complete control over the style and presentation of the UI.

Supported XSL-T Processors

Question

What XSL processors can be used by Discoverer 3i Viewer?

Answer

Discoverer 3i Viewer can be configured to use:

Specifying the XSL-T Processor in the Servlet's Classpath

Question

How can you specify which XSL processor Discoverer 3i Viewer uses?

Answer

By default Discoverer 3i Viewer uses Oracle XSL-T Processor. If you prefer you can use James Clark's XT. The Servlet can be reconfigured to use the James Clark XSL processor as follows:

  1. Include the XT processor in the servlet's classpath. The XT processor is available as a Zip file, xt.zip, from http://www.jclark.com/xml/xt.html

  2. Unpack the Zip file to access the xt.jar file

    The JAR should be included in either the class path of the Servlet engine or the classpath for the Servlet engine zone. Different servlet engines have different ways of doing this.

    For example, for Apache JServ the servlet engine's class path is setup in the wrapper.classpath entry of the JServ.properties file. The classpath for the servlet zone is specified as a repository in the servlet zone properties.

    For details on how to set up each servlet engine read the section in the Discoverer Installation and Administration Guide on how Visibroker jar files are installed for that servlet engine. The process for installing the XT processor Jar file is identical.

  3. Modify the Discoverer Viewer configuration file. Include the following line should in the <document> element of the disco3iv.xml configuration file:

     <argument name="xsl_processor">com.jclark.xsl.sax.XSLProcessor</argument> 
    
    
  4. Restart the web server.

XSL Editors

Question

What tools are available to edit XSL Stylesheets?

Answer

You can use any text editor to edit XSL files however the following applications are designed especially for editing XSL:

Customizing Stylesheets

Question

What is commonly changed in order to customize a stylesheet?

Answer

To customize a styelsheet, edit the following items:

Viewing Changes to a Modified Stylesheet

Question

When I customize my own XSL Stylesheet, why can't I see my changes?

Answer

By default, the XSL-T Processor caches the XSL files in its memory for better performance. You have two options for viewing the changes:

Browser Displays Blank Screen

Question

Why does my browser display a blank screen?

Answer

This is usually because you have done either of the following:

More information on XML and XSL

Question

Where can I find more information on XML and XSL?

Answer


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index