Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.nwalsh.saxon6
Class CalloutEmitter

    java.lang.Object
      |
      +--com.nwalsh.saxon6.CopyEmitter
            |
            +--com.nwalsh.saxon6.CalloutEmitter

public class CalloutEmitter
extends CopyEmitter

Saxon extension to decorate a result tree fragment with callouts.

$Id: CalloutEmitter.html,v 1.1 2002/05/15 17:22:27 isberg Exp $

Copyright (C) 2000 Norman Walsh.

This class provides the guts of a Saxon 6.* implementation of callouts for verbatim environments. (It is used by the Verbatim class.)

The general design is this: the stylesheets construct a result tree fragment for some verbatim environment. The Verbatim class initializes a CalloutEmitter with information about the callouts that should be applied to the verbatim environment in question. Then the result tree fragment is "replayed" through the CalloutEmitter; the CalloutEmitter builds a new result tree fragment from this event stream, decorated with callouts, and that is returned.

Change Log:

1.0

  Initial release.

See Also:
  `Verbatim`

Constructor Summary
`CalloutEmitter(com.icl.saxon.om.NamePool namePool, java.lang.String graphicsPath, java.lang.String graphicsExt, int graphicsMax, int defaultColumn, boolean foStylesheet)` Constructor for the CalloutEmitter.

Method Summary
`void` | `characters(char[] chars, int start, int len)` Process characters.
`void` | `endElement(int nameCode)` Process end element events.
`void` | `setupCallouts(com.icl.saxon.expr.NodeSetIntent areaspecNodeSet)` Examine the areaspec and determine the number and position of callouts.
`void` | `startElement(int nameCode, org.xml.sax.Attributes attributes, int[] namespaces, int nscount)` Process start element events.

Methods inherited from class com.nwalsh.saxon6.CopyEmitter
`comment, endDocument, getResultTreeFragment, processingInstruction, setCharacterSet, setDocumentLocator, setEscaping, setNamePool, setOutputDetails, setUnparsedEntity, setWriter, startDocument`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CalloutEmitter

    public CalloutEmitter(com.icl.saxon.om.NamePool namePool,
                          java.lang.String graphicsPath,
                          java.lang.String graphicsExt,
                          int graphicsMax,
                          int defaultColumn,
                          boolean foStylesheet)

  Constructor for the CalloutEmitter.

  Parameters:
    `namePool` - The name pool to use for constructing elements and attributes.
    `graphicsPath` - The path to callout number graphics.
    `graphicsExt` - The extension for callout number graphics.
    `graphicsMax` - The largest callout number that can be represented as a graphic.
    `defaultColumn` - The default column for callouts.
    `foStylesheet` - Is this an FO stylesheet?

Method Detail

### setupCallouts

    public void setupCallouts(com.icl.saxon.expr.NodeSetIntent areaspecNodeSet)

  Examine the areaspec and determine the number and position of callouts.

  The `areaspecNodeSet` is examined and a sorted list of the callouts is constructed.

  This data structure is used to augment the result tree fragment with callout bullets.

  Parameters:
    `areaspecNodeSet` - The source document <areaspec> element.

### characters

    public void characters(char[] chars,
                           int start,
                           int len)
                    throws org.xml.sax.SAXException

  Process characters.
  Overrides:
    characters in class CopyEmitter

### endElement

    public void endElement(int nameCode)
                    throws org.xml.sax.SAXException

  Process end element events.
  Overrides:
    endElement in class CopyEmitter

### startElement

    public void startElement(int nameCode,
                             org.xml.sax.Attributes attributes,
                             int[] namespaces,
                             int nscount)
                      throws org.xml.sax.SAXException

  Process start element events.
  Overrides:
    startElement in class CopyEmitter

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD