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

## net.sf.saxon.event
Class SequenceOutputter

    java.lang.Object
      net.sf.saxon.event.SequenceReceiver
          net.sf.saxon.event.SequenceWriter
              net.sf.saxon.event.SequenceOutputter

All Implemented Interfaces:
  Receiver, javax.xml.transform.Result

public final class SequenceOutputter
extends SequenceWriter

This outputter is used when writing a sequence of atomic values and nodes, that is, when xsl:variable is used with content and an "as" attribute. The outputter builds the sequence and provides access to it. (It isn't really an outputter at all, it doesn't pass the events to anyone, it merely constructs the sequence in memory and provides access to it). Note that the event sequence can include calls such as startElement and endElement that require trees to be built. If nodes such as attributes and text nodes are received while an element is being constructed, the nodes are added to the tree. Otherwise, "orphan" nodes (nodes with no parent) are created and added directly to the sequence.

This class is not used to build temporary trees. For that, the ComplexContentOutputter is used.

Field Summary

Fields inherited from class net.sf.saxon.event.SequenceReceiver
`pipelineConfiguration, previousAtomic`

Fields inherited from interface javax.xml.transform.Result
`PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING`

Constructor Summary
`SequenceOutputter()` Create a new SequenceOutputter
`SequenceOutputter(int estimatedSize)`

Method Summary
`Item` | `getFirstItem()` Get the first item in the sequence that has been built
`java.util.ArrayList` | `getList()` Get the list containing the sequence of items
`ValueRepresentation` | `getSequence()` Get the sequence that has been built
`SequenceIterator` | `iterate()` Get an iterator over the sequence of items that has been constructed
`Item` | `popLastItem()` Get the last item in the sequence that has been built, and remove it
`void` | `write(Item item)` Abstract method to be supplied by subclasses: output one item in the sequence.

Methods inherited from class net.sf.saxon.event.SequenceWriter
`append, attribute, characters, close, comment, endDocument, endElement, getSystemId, hasOpenNodes, namespace, processingInstruction, setSystemId, startContent, startDocument, startElement`

Methods inherited from class net.sf.saxon.event.SequenceReceiver
`getConfiguration, getNamePool, getPipelineConfiguration, open, setPipelineConfiguration, setUnparsedEntity`

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

Constructor Detail

### SequenceOutputter

    public SequenceOutputter()

  Create a new SequenceOutputter

### SequenceOutputter

    public SequenceOutputter(int estimatedSize)

Method Detail

### write

    public void write(Item item)

  Abstract method to be supplied by subclasses: output one item in the sequence.

  Specified by:
    `write` in class `SequenceWriter`

### getSequence

    public ValueRepresentation getSequence()

  Get the sequence that has been built

### iterate

    public SequenceIterator iterate()

  Get an iterator over the sequence of items that has been constructed

### getList

    public java.util.ArrayList getList()

  Get the list containing the sequence of items

### getFirstItem

    public Item getFirstItem()

  Get the first item in the sequence that has been built

### popLastItem

    public Item popLastItem()

  Get the last item in the sequence that has been built, and remove it

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