Class DocumentSender

java.lang.Object
net.sf.saxon.event.DocumentSender
All Implemented Interfaces:
SourceLocator, LocationProvider, SaxonLocator, Locator

public class DocumentSender extends Object implements SaxonLocator
Sends an entire document to a Receiver.
Author:
Ruud Diterwich, integrated by Michael Kay
  • Constructor Details

    • DocumentSender

      public DocumentSender(NodeInfo top)
      Create a DocumentSender, which takes an input document tree and generates a stream of events for a Receiver
      Parameters:
      top - the document or element node to be turned into a stream of events
  • Method Details

    • send

      public void send(Receiver receiver) throws XPathException
      Send the entire document to the receiver
      Throws:
      XPathException
    • getColumnNumber

      public int getColumnNumber()
      Specified by:
      getColumnNumber in interface Locator
      Specified by:
      getColumnNumber in interface SourceLocator
    • getLineNumber

      public int getLineNumber()
      Specified by:
      getLineNumber in interface Locator
      Specified by:
      getLineNumber in interface SourceLocator
    • getPublicId

      public String getPublicId()
      Specified by:
      getPublicId in interface Locator
      Specified by:
      getPublicId in interface SourceLocator
    • getSystemId

      public String getSystemId()
      Specified by:
      getSystemId in interface Locator
      Specified by:
      getSystemId in interface SourceLocator
    • getSystemId

      public String getSystemId(long locationId)
      Description copied from interface: LocationProvider
      Get the URI of the document or module containing a particular location
      Specified by:
      getSystemId in interface LocationProvider
      Parameters:
      locationId - identifier of the location in question (as passed down the Receiver pipeline)
      Returns:
      the URI of the document or module.
    • getLineNumber

      public int getLineNumber(long locationId)
      Description copied from interface: LocationProvider
      Get the line number within the document or module containing a particular location
      Specified by:
      getLineNumber in interface LocationProvider
      Parameters:
      locationId - identifier of the location in question (as passed down the Receiver pipeline)
      Returns:
      the line number within the document or module.
    • getColumnNumber

      public int getColumnNumber(long locationId)
      Description copied from interface: LocationProvider
      Get the column number within the document or module containing a particular location
      Specified by:
      getColumnNumber in interface LocationProvider
      Parameters:
      locationId - identifier of the location in question (as passed down the Receiver pipeline)
      Returns:
      the column number within the document or module, or -1 if this is not available