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

Match processing instruction nodes

As mentioned earlier, FrameMaker occasionally reacts badly to non-FrameMaker processing instructions. To forestall any problems, the template that handles processing instructions deletes all processing instructions, except those from FrameMaker.

Using the <xsl:choose> statement rather than <xsl:if> makes it easier to modify the transform if you want to handle additional processing instructions in the future.

<xsl:template match="node()[self::processing-instruction()]" mode="identity">
    <xsl:choose>
        <xsl:when test="name() = 'Fm'">
            <xsl:copy/>
        </xsl:when>
        <xsl:otherwise><!-- Do nothing. --></xsl:otherwise>
    </xsl:choose>
</xsl:template>

 

 

Next Page:
Match text nodes


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