Utility Tools

CHAPTER 5

XSL Editor

This chapter describes the facilities that the Novell exteNd Director development environment provides to work with XSL files. It contains the following topics:

 
Top of page

About XSL

XSL (eXtensible Stylesheet Language) is a standard language for expressing style sheets. You can develop and use XSL style sheets to control how the contents of XML documents are displayed.

XSL includes the following features:

For more information    The complete XSL standard can be found at www.w3.org/Style/XSL.

The power of XSLT   Document transformation is the most important feature of XSL. The XSLT language was originally provided to perform complex styling operations, but you are now more likely to use it as a general purpose XML processing language. In particular, XSLT is useful for transforming an XML document into a different XML, XHTML, HTML, or other document.

XSLT works by transforming the XML input document (represented as a source tree) into the output document (represented as a result tree). You define templates that:

 
Top of page

XSL in the development environment

The exteNd Director development environment provides the following tools for working with XSL:

Required files   With either tool, you'll need the following files before you begin (unless you plan to write your XSLT code manually):

File

Purpose

XML source document

Provides the XML to be transformed

XML result document

Provides a sample of the XML to be produced; you'll map the source document's XML tree to the result document's XML tree in order to generate the XSLT code you need

 
Top of page

Creating and opening XSL files

You can create new XSL files or work with existing ones.

Procedure To create a new XSL file:

  1. Select File>New>File.

  2. On the XML tab, select XSL file.

  3. To create a blank XSL file, deselect Use Wizard and click OK. An empty XSL file is created and displayed in the XSL Editor.

    To use the XSL File Wizard, select Use Wizard and click OK. The XSL File Wizard displays. Go through the wizard as follows.

  4. Specify the name of the XSL file and click Next.

  5. Specify the location of the XSL file and click Next.

  6. Specify the XML source document and click Next.

  7. Specify the XML result document and click Finish.

    The XSL Editor displays with your new XSL file open.

Procedure To open an XSL file:

  1. Select File>Open.

  2. In the Open dialog, select the XSL file and click Open.

    The file extension must be .XSL. The selected file opens in the XSL Editor and the XSL Editor menu appears on the menu bar.

 
Top of page

Using the XSL Editor

The XSL Editor provides two views for working with an XSL file:

Here's an example of using the XSL Editor's Designer to develop a style sheet that transforms one XML file (containing information about birds) into another XML file with a different format:

XSLeditor




Copyright © 2004 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved.  more ...