Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
XML Streams Module User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

6.1 Introduction

This chapter discusses inserting an XSLT transformation into an XML stream. XSLT means "XSL Transformation" and is specified by the W3C at http://www.w3.org/TR/1999/REC-xslt-19991116.

XSLT is "a language for transforming XML documents into other XML documents," according to the W3C Working Draft, August 13, 1999. XSLT supports the creation of new structured information from existing XML documents in order to facilitate sharing data. This conversion offers an easy way to share XML documents that conform to different DTDs.

6.1.1 Your XSLT Processor

To perform an XSLT conversion, you need an XSLT processor. The XML Streams Module does not ship with an XSLT processor, giving you the ability to select the processor of your choice.

Among the most popular implementations of XSLT processors is the Apache XML Project's Xalan. The XML Streams Module has previously provided support for Xalan. If you wish to use Xalan as your XSLT processor, you may still access the Rogue Wave header files supporting XSLT transformations using Xalan. These header files are now included in the XSLT example directory at buildspace\examples\xmlstreams\xsltTransform.

You may include the headers from that directory, or even copy them into your buildspace/rw directory. You may also modify the headers to support any other XSLT processor with a suitable iostream interface (or an interface that can be adapted appropriately).

6.1.2 The XSLT Transformation Procedure

The example in this chapter uses the Xalan XSLT processor in order to provide continuity and support for implementations based on Xalan.

If you are using a different XSLT processor, you will need to adapt this example to meet your needs. The basic procedure should be the same.

The steps to create an XSLT transformation stream are

  1. Creating the transformation objects and the input and output streams

  2. a.

    Defining the transformation object

    b.

    Defining a character transformation input and output stream

    c.

    Defining an XSLT input and output stream using the transformation object and the character transformation streams

  3. Performing the transformation

  4. a.

    Serializing the book object to a file

    b.

    Restoring the book object


    These examples do not include all of the functions for this class. The full definition of the class can be found in buildspace\examples\xmlstreams\xsltTransform\RWXsltObjectInputStreamImp.h.



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.