com.nwalsh.saxon

Class ColumnScanEmitter


public class ColumnScanEmitter
extends com.icl.saxon.output.Emitter

Saxon extension to scan the column widths in a result tree fragment.

$Id: ColumnScanEmitter.java 5907 2006-04-27 08:26:47Z xmldoc $

Copyright (C) 2000 Norman Walsh.

This class provides a Saxon 6.* implementation to scan the column widths in a result tree fragment.

The general design is this: the stylesheets construct a result tree fragment for some colgroup environment. That result tree fragment is "replayed" through the ColumnScanEmitter; the ColumnScanEmitter watches the cols go by and extracts the column widths that it sees. These widths are then made available.

Change Log:

Field Summary

protected static String
foURI
The FO namespace name.
protected NamePool
namePool
protected int
numColumns
The number of columns seen.
protected String[]
width

Constructor Summary

ColumnScanEmitter(NamePool namePool)
Construct a new ColumnScanEmitter.

Method Summary

void
characters(char[] chars, int start, int len)
Discarded.
int
columnCount()
Return the number of columns.
String[]
columnWidths()
Return the number of columns.
void
comment(char[] chars, int start, int length)
Discarded.
void
endDocument()
Discarded.
void
endElement(int nameCode)
Discarded.
void
processingInstruction(java.lang.String name, java.lang.String data)
Discarded.
void
setDocumentLocator(org.xml.sax.Locator locator)
Discarded.
void
setEscaping(boolean escaping)
Discarded.
void
setNamePool(NamePool namePool)
Discarded.
void
setUnparsedEntity(java.lang.String name, java.lang.String uri)
Discarded.
void
setWriter(java.io.Writer writer)
Discarded.
void
startDocument()
Discarded.
void
startElement(int nameCode, org.xml.sax.Attributes attributes, int[] namespaces, int nscount)
Examine for column info.

Field Details

foURI

protected static String foURI
The FO namespace name.

namePool

protected NamePool namePool

numColumns

protected int numColumns
The number of columns seen.

width

protected String[] width

Constructor Details

ColumnScanEmitter

public ColumnScanEmitter(NamePool namePool)
Construct a new ColumnScanEmitter.

Method Details

characters

public void characters(char[] chars,
                       int start,
                       int len)
            throws TransformerException
Discarded.

columnCount

public int columnCount()
Return the number of columns.

columnWidths

public String[] columnWidths()
Return the number of columns.

comment

public void comment(char[] chars,
                    int start,
                    int length)
            throws TransformerException
Discarded.

endDocument

public void endDocument()
            throws TransformerException
Discarded.

endElement

public void endElement(int nameCode)
            throws TransformerException
Discarded.

processingInstruction

public void processingInstruction(java.lang.String name,
                                  java.lang.String data)
            throws TransformerException
Discarded.

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator locator)
Discarded.

setEscaping

public void setEscaping(boolean escaping)
            throws TransformerException
Discarded.

setNamePool

public void setNamePool(NamePool namePool)
Discarded.

setUnparsedEntity

public void setUnparsedEntity(java.lang.String name,
                              java.lang.String uri)
            throws TransformerException
Discarded.

setWriter

public void setWriter(java.io.Writer writer)
Discarded.

startDocument

public void startDocument()
            throws TransformerException
Discarded.

startElement

public void startElement(int nameCode,
                         org.xml.sax.Attributes attributes,
                         int[] namespaces,
                         int nscount)
            throws TransformerException
Examine for column info.