Package net.sf.saxon.event
Class DocumentSender
java.lang.Object
net.sf.saxon.event.DocumentSender
- All Implemented Interfaces:
SourceLocator,LocationProvider,SaxonLocator,Locator
Sends an entire document to a Receiver.
- Author:
- Ruud Diterwich, integrated by Michael Kay
-
Constructor Summary
ConstructorsConstructorDescriptionDocumentSender(NodeInfo top) Create a DocumentSender, which takes an input document tree and generates a stream of events for a Receiver -
Method Summary
Modifier and TypeMethodDescriptionintintgetColumnNumber(long locationId) Get the column number within the document or module containing a particular locationintintgetLineNumber(long locationId) Get the line number within the document or module containing a particular locationgetSystemId(long locationId) Get the URI of the document or module containing a particular locationvoidSend the entire document to the receiver
-
Constructor Details
-
DocumentSender
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
Send the entire document to the receiver- Throws:
XPathException
-
getColumnNumber
public int getColumnNumber()- Specified by:
getColumnNumberin interfaceLocator- Specified by:
getColumnNumberin interfaceSourceLocator
-
getLineNumber
public int getLineNumber()- Specified by:
getLineNumberin interfaceLocator- Specified by:
getLineNumberin interfaceSourceLocator
-
getPublicId
- Specified by:
getPublicIdin interfaceLocator- Specified by:
getPublicIdin interfaceSourceLocator
-
getSystemId
- Specified by:
getSystemIdin interfaceLocator- Specified by:
getSystemIdin interfaceSourceLocator
-
getSystemId
Description copied from interface:LocationProviderGet the URI of the document or module containing a particular location- Specified by:
getSystemIdin interfaceLocationProvider- 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:LocationProviderGet the line number within the document or module containing a particular location- Specified by:
getLineNumberin interfaceLocationProvider- 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:LocationProviderGet the column number within the document or module containing a particular location- Specified by:
getColumnNumberin interfaceLocationProvider- 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
-