Package net.sf.saxon.event
Class DocumentSender
- java.lang.Object
-
- net.sf.saxon.event.DocumentSender
-
- All Implemented Interfaces:
javax.xml.transform.SourceLocator
,LocationProvider
,SaxonLocator
,org.xml.sax.Locator
public class DocumentSender extends java.lang.Object implements SaxonLocator
Sends an entire document to a Receiver.- Author:
- Ruud Diterwich, integrated by Michael Kay
-
-
Constructor Summary
Constructors Constructor Description DocumentSender(NodeInfo top)
Create a DocumentSender, which takes an input document tree and generates a stream of events for a Receiver
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getColumnNumber()
int
getLineNumber()
int
getLineNumber(int locationId)
Get the line number within the document or module containing a particular locationjava.lang.String
getPublicId()
java.lang.String
getSystemId()
java.lang.String
getSystemId(int locationId)
Get the URI of the document or module containing a particular locationvoid
send(Receiver receiver)
Send the entire document to the receiver
-
-
-
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 interfaceorg.xml.sax.Locator
- Specified by:
getColumnNumber
in interfacejavax.xml.transform.SourceLocator
-
getLineNumber
public int getLineNumber()
- Specified by:
getLineNumber
in interfaceorg.xml.sax.Locator
- Specified by:
getLineNumber
in interfacejavax.xml.transform.SourceLocator
-
getPublicId
public java.lang.String getPublicId()
- Specified by:
getPublicId
in interfaceorg.xml.sax.Locator
- Specified by:
getPublicId
in interfacejavax.xml.transform.SourceLocator
-
getSystemId
public java.lang.String getSystemId()
- Specified by:
getSystemId
in interfaceorg.xml.sax.Locator
- Specified by:
getSystemId
in interfacejavax.xml.transform.SourceLocator
-
getSystemId
public java.lang.String getSystemId(int locationId)
Description copied from interface:LocationProvider
Get the URI of the document or module containing a particular location- Specified by:
getSystemId
in 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(int locationId)
Description copied from interface:LocationProvider
Get the line number within the document or module containing a particular location- Specified by:
getLineNumber
in interfaceLocationProvider
- Parameters:
locationId
- identifier of the location in question (as passed down the Receiver pipeline)- Returns:
- the line number within the document or module.
-
-