Oracle8i Application Developer's Guide - XML Release 3 (8.1.7) Part Number A86030-01 |
Library | Service | Contents | Index

An XML Primer, 6 of 9

## Presenting XML Using Stylesheets

A key advantage of using XML as a datasource is that its presentation (such as a web page) can be separate from its structure and content.

- Presentation. Applied stylesheets define its presentation. XML data can be presented in various ways, both in appearance and organization, simply by applying different stylesheets.

- Structure and content: XML data defines the structure and content.

#### Stylesheet Uses

Consider these ways of using stylesheets:

- A different interface can be presented to different users based on user profile, browser type, or other criteria by defining a different stylesheet for each presentation style.

- Stylesheets can be used to transform XML data into a format tailored to the specific application that receives and processes the data.

Stylesheets can be applied on the server or client side. The XSL-Transformation Processor (XSL-T Processor) transforms one XML format into XML or any other text-based format such as HTML. Oracle XML Parsers all include an XSL-T Processor.

How to apply stylesheets and use the XSL-T Processor is described in the following sections:

- Chapter 17, "Using XML Parser for Java"

- Chapter 11, "Customizing Discoverer 3i Viewer with XSL"

### eXtensible Stylesheet Language (XSL)

eXtensible Stylesheet Language (XSL), the stylesheet language of XML is another W3C recommendation. XSL provides for stylesheets that allow you to do the following:

- Transform XML into XML or other text-based formats such as HTML

- Rearrange or filter data

- Convert XML data to XML that conforms with another Document Type Definition (DTD), an important capability for allowing different applications to share data

### Cascading Style Sheets (CSS)

Cascading Style Sheets (CSS1), a W3C specification was originally created for use with HTML documents. With CSS you can control the following aspects of your document's appearance:

- Spacing. Element visbility, position, and size

- Colors and background

- Fonts and text

CSS2 was published by W3C in 1998 and includes the following additional features:

- System fonts and colors

- Automatic numbering

- Supports paged media

- Tables and aura stylesheets

'Cascading' here implies that you can apply several stylesheets to any one document. On a web page deploying CSSm, for example, three stylesheets can apply or cascade:

1. User's preferred stylesheet takes precedence

2. Cascading stylesheet

3. Browser stylesheet

| Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
Library | Service | Contents | Index