com.saxonica.serialize

## Class SequenceWrapperPE

- java.lang.Object
- - net.sf.saxon.event.SequenceReceiver
  - - net.sf.saxon.query.SequenceWrapper
    - - com.saxonica.serialize.SequenceWrapperPE

- All Implemented Interfaces:
    Result, Receiver

      public class SequenceWrapperPE
      extends SequenceWrapper

  This class can be used in a push pipeline: it accepts any sequence as input, and generates a document in which the items of the sequence are wrapped by elements containing information about the types of the items in the input sequence.

  This class adds to the superclass the ability to serialize maps.

- - ### Field Summary

    - ### Fields inherited from class net.sf.saxon.query.SequenceWrapper

      `RESULT_NS`

    - ### Fields inherited from class net.sf.saxon.event.SequenceReceiver

      `pipelineConfiguration, previousAtomic, systemId`

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

      `PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SequenceWrapperPE(Receiver destination)` Create a sequence wrapper.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `append(Item item, int locationId, int copyNamespaces)` Output an item (atomic value or node) to the sequence
    `void` | `open()` Start the output process

    - ### Methods inherited from class net.sf.saxon.query.SequenceWrapper

      `attribute, characters, close, comment, endDocument, endElement, getDestination, namespace, processingInstruction, startContent, startDocument, startElement, usesTypeAnnotations`

    - ### Methods inherited from class net.sf.saxon.event.SequenceReceiver

      `append, getConfiguration, getNamePool, getPipelineConfiguration, getSystemId, setPipelineConfiguration, setSystemId, setUnparsedEntity`

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

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

- - ### Constructor Detail

    - #### SequenceWrapperPE

          public SequenceWrapperPE(Receiver destination)

      Create a sequence wrapper. This creates an XML representation of the items sent to destination in which the types of all items are made explicit
      Parameters:
        `destination` - the sequence being wrapped

  - ### Method Detail

    - #### open

          public void open()
                    throws XPathException

      Description copied from class: `SequenceReceiver`
      Start the output process
      Specified by:
        `open` in interface `Receiver`
      Overrides:
        `open` in class `SequenceWrapper`
      Throws:
        `XPathException` - if an error occurs

    - #### append

          public void append(Item item,
                    int locationId,
                    int copyNamespaces)
                      throws XPathException

      Output an item (atomic value or node) to the sequence
      Overrides:
        `append` in class `SequenceWrapper`
      Parameters:
        `item` - the item to be appended
        `locationId` - the location of the calling instruction, for diagnostics
        `copyNamespaces` - if the item is an element node, this indicates whether its namespaces need to be copied. Values are `NodeInfo.ALL_NAMESPACES`, `NodeInfo.LOCAL_NAMESPACES`, `NodeInfo.NO_NAMESPACES`
      Throws:
        `XPathException` - if the operation fails

Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.