net.sf.saxon.event
Class DocumentSender

java.lang.Object
  extended by 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 Summary
DocumentSender(NodeInfo top)
          Create a DocumentSender, which takes an input document tree and generates a stream of events for a Receiver
 
Method Summary
 int getColumnNumber()
           
 int getColumnNumber(long locationId)
          Get the column number within the document, entity, or module containing a particular location
 int getLineNumber()
           
 int getLineNumber(long locationId)
          Get the line number within the document, entity or module containing a particular location
 String getPublicId()
           
 String getSystemId()
           
 String getSystemId(long locationId)
          Get the URI of the document, entity, or module containing a particular location
 void send(Receiver receiver)
          Send the entire document to the receiver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

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 SourceLocator
Specified by:
getColumnNumber in interface Locator

getLineNumber

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

getPublicId

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

getSystemId

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

getSystemId

public String getSystemId(long locationId)
Description copied from interface: LocationProvider
Get the URI of the document, entity, 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, XML entity or module. For a SourceLocationProvider this will be the URI of the document or entity (the URI that would be the base URI if there were no xml:base attributes). In other cases it may identify the query or stylesheet module currently being executed.

getLineNumber

public int getLineNumber(long locationId)
Description copied from interface: LocationProvider
Get the line number within the document, entity 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, entity or module, or -1 if no information is available.

getColumnNumber

public int getColumnNumber(long locationId)
Description copied from interface: LocationProvider
Get the column number within the document, entity, 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, entity, or module, or -1 if this is not available


Copyright (c) Saxonica Limited. All rights reserved.