Package net.sf.saxon.dom
Class DOMSender
java.lang.Object
net.sf.saxon.dom.DOMSender
- All Implemented Interfaces:
SourceLocator,LocationProvider,SaxonLocator,SourceLocationProvider,Locator
DOMSender.java: pseudo-SAX driver for a DOM source document.
This class takes an existing
DOM Document and walks around it in a depth-first traversal,
calling a Receiver to process the nodes as it does so
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintintgetLineNumber(int locationId) Get the line number within the document or module containing a particular locationgetSystemId(int locationId) Get the URI of the document or module containing a particular locationvoidsend()Walk a document (traversing the nodes depth first)voidSet the pipeline configurationvoidsetReceiver(Receiver receiver) Set the receiver.voidsetStartNode(Node start) Set the DOM Document that will be walkedvoidsetSystemId(String systemId) Set the systemId of the source document (which will also be used for the destination)
-
Field Details
-
root
-
systemId
-
-
Constructor Details
-
DOMSender
public DOMSender()
-
-
Method Details
-
setPipelineConfiguration
Set the pipeline configuration -
setReceiver
Set the receiver.- Parameters:
receiver- The object to receive content events.
-
setStartNode
Set the DOM Document that will be walked -
setSystemId
Set the systemId of the source document (which will also be used for the destination) -
send
Walk a document (traversing the nodes depth first)- Throws:
XPathException- On any error in the document
-
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(int 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.
-