Package com.nwalsh.saxon

# Class ColumnScanEmitter

java.lang.Object
com.icl.saxon.output.Emitter
com.nwalsh.saxon.ColumnScanEmitter

All Implemented Interfaces:
  `Result`

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:

1.0

  Initial release.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected static String`
`foURI`
The FO namespace name.
`protected com.icl.saxon.om.NamePool`
`namePool`
`protected int`
`numColumns`
The number of columns seen.
`protected String[]`
`width`

### Fields inherited from class com.icl.saxon.output.Emitter

`locator, outputProperties, outputStream, systemId, writer`

### Fields inherited from interface javax.xml.transform.Result

`PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING`

## Constructor Summary

Constructors
Constructor
Description
`ColumnScanEmitter(com.icl.saxon.om.NamePool namePool)`
Construct a new ColumnScanEmitter.

## Method Summary

Modifier and Type
Method
Description
`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(String name, String data)`
Discarded.
`void`
`setDocumentLocator(Locator locator)`
Discarded.
`void`
`setEscaping(boolean escaping)`
Discarded.
`void`
`setNamePool(com.icl.saxon.om.NamePool namePool)`
Discarded.
`void`
`setUnparsedEntity(String name, String uri)`
Discarded.
`void`
`setWriter(Writer writer)`
Discarded.
`void`
`startDocument()`
Discarded.
`void`
`startElement(int nameCode, Attributes attributes, int[] namespaces, int nscount)`
Examine for column info.

### Methods inherited from class com.icl.saxon.output.Emitter

`getNamePool, getOutputProperties, getOutputStream, getSystemId, getWriter, makeEmitter, setOutputProperties, setOutputStream, setSystemId, usesWriter`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### numColumns

protected int numColumns
The number of columns seen.

### width

protected String[] width

### namePool

protected com.icl.saxon.om.NamePool namePool

### foURI

protected static String foURI
The FO namespace name.

## Constructor Details

### ColumnScanEmitter

public ColumnScanEmitter(com.icl.saxon.om.NamePool namePool)
Construct a new ColumnScanEmitter.

## Method Details

### columnCount

public int columnCount()
Return the number of columns.

### columnWidths

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

### characters

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

Specified by:
  `characters` in class `com.icl.saxon.output.Emitter`
Throws:
  `TransformerException`

### comment

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

Specified by:
  `comment` in class `com.icl.saxon.output.Emitter`
Throws:
  `TransformerException`

### endDocument

public void endDocument() throws TransformerException
Discarded.

Specified by:
  `endDocument` in class `com.icl.saxon.output.Emitter`
Throws:
  `TransformerException`

### endElement

public void endElement(int nameCode) throws TransformerException
Discarded.

Specified by:
  `endElement` in class `com.icl.saxon.output.Emitter`
Throws:
  `TransformerException`

### processingInstruction

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

Specified by:
  `processingInstruction` in class `com.icl.saxon.output.Emitter`
Throws:
  `TransformerException`

### setDocumentLocator

public void setDocumentLocator(Locator locator)
Discarded.

Overrides:
  `setDocumentLocator` in class `com.icl.saxon.output.Emitter`

### setEscaping

public void setEscaping(boolean escaping) throws TransformerException
Discarded.

Overrides:
  `setEscaping` in class `com.icl.saxon.output.Emitter`
Throws:
  `TransformerException`

### setNamePool

public void setNamePool(com.icl.saxon.om.NamePool namePool)
Discarded.

Overrides:
  `setNamePool` in class `com.icl.saxon.output.Emitter`

### setUnparsedEntity

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

Overrides:
  `setUnparsedEntity` in class `com.icl.saxon.output.Emitter`
Throws:
  `TransformerException`

### setWriter

public void setWriter(Writer writer)
Discarded.

Overrides:
  `setWriter` in class `com.icl.saxon.output.Emitter`

### startDocument

public void startDocument() throws TransformerException
Discarded.

Specified by:
  `startDocument` in class `com.icl.saxon.output.Emitter`
Throws:
  `TransformerException`

### startElement

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

Specified by:
  `startElement` in class `com.icl.saxon.output.Emitter`
Throws:
  `TransformerException`