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.
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
int[] namespaces,
int nscount)
Process start element events.
Methods inherited from class com.nwalsh.saxon6.CopyEmitter
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)