Table of contents

Abstract

Introduction

The basic concepts

Stylesheet organization

Root template

Match processing instruction nodes

Match text nodes

Match attributes

Match other nodes

Keepspace template

Using the stylesheet

The complete stylesheet

Using the stylesheet

To use this stylesheet, you can either run it by itself, or you can add it to a FrameMaker structured application.

If you choose to run the stylesheet by itself, read my blog post Ignoring DOCTYPE in XSL Transforms using Saxon 9B. Otherwise you’ll have to find some other way of removing the DOCTYPE declarations before processing.

To add the stylesheet to a structured application, edit the structapps.fm file in structured FrameMaker and find the application you want to modify (typically DITA-Topic-FM). If you want to be able to import XML files with and without whitespace modification, you can make a copy of the DITA-Topic-FM application and name the copy something like DITA-NoWhitespaceTopic-FM.

In the application you’re modifying, add the following elements after the ReadWriteRules element:

The Stylesheet element contains the path to the handle_whitespace.xsl stylesheet. Typically, it should be in $STRUCTDIR\xml\dita\app\DITA-Topic-FM\handlewhitespace.xsl.

NOTE: Normally in structured FrameMaker, you can make these changes to the structapps.fm file in the FrameMaker installation folder (typically C:\Program Files\Adobe\FrameMaker{version}\Structure). However, things seem to be broken in FrameMaker 9.0. At current writing (FM9.0p250), you must make these changes in the structapps.fm file in each users’ Application Data folder (C:\Documents and Settings\{user}\Application Data\Adobe\FrameMaker\9). We hope this bug is corrected soon.

 

Next Page:
The complete stylesheet


Scriptorium Publishing | Post Office Box 12761 Research Triangle Park, NC 27709 | (919) 481 2701 | info@scriptorium.com