Package net.sf.saxon.dom
Class DOMSender
- java.lang.Object
-
- net.sf.saxon.dom.DOMSender
-
- All Implemented Interfaces:
javax.xml.transform.SourceLocator,LocationProvider,SaxonLocator,SourceLocationProvider,org.xml.sax.Locator
public class DOMSender extends java.lang.Object implements SaxonLocator, SourceLocationProvider
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
-
-
Constructor Summary
Constructors Constructor Description DOMSender()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetColumnNumber()intgetLineNumber()intgetLineNumber(int locationId)Get the line number within the document or module containing a particular locationjava.lang.StringgetPublicId()java.lang.StringgetSystemId()java.lang.StringgetSystemId(int locationId)Get the URI of the document or module containing a particular locationvoidsend()Walk a document (traversing the nodes depth first)voidsetPipelineConfiguration(PipelineConfiguration pipe)Set the pipeline configurationvoidsetReceiver(Receiver receiver)Set the receiver.voidsetStartNode(org.w3c.dom.Node start)Set the DOM Document that will be walkedvoidsetSystemId(java.lang.String systemId)Set the systemId of the source document (which will also be used for the destination)
-
-
-
Method Detail
-
setPipelineConfiguration
public void setPipelineConfiguration(PipelineConfiguration pipe)
Set the pipeline configuration
-
setReceiver
public void setReceiver(Receiver receiver)
Set the receiver.- Parameters:
receiver- The object to receive content events.
-
setStartNode
public void setStartNode(org.w3c.dom.Node start)
Set the DOM Document that will be walked
-
setSystemId
public void setSystemId(java.lang.String systemId)
Set the systemId of the source document (which will also be used for the destination)
-
send
public void send() throws XPathExceptionWalk a document (traversing the nodes depth first)- Throws:
XPathException- On any error in the document
-
getColumnNumber
public int getColumnNumber()
- Specified by:
getColumnNumberin interfaceorg.xml.sax.Locator- Specified by:
getColumnNumberin interfacejavax.xml.transform.SourceLocator
-
getLineNumber
public int getLineNumber()
- Specified by:
getLineNumberin interfaceorg.xml.sax.Locator- Specified by:
getLineNumberin interfacejavax.xml.transform.SourceLocator
-
getPublicId
public java.lang.String getPublicId()
- Specified by:
getPublicIdin interfaceorg.xml.sax.Locator- Specified by:
getPublicIdin interfacejavax.xml.transform.SourceLocator
-
getSystemId
public java.lang.String getSystemId()
- Specified by:
getSystemIdin interfaceorg.xml.sax.Locator- Specified by:
getSystemIdin interfacejavax.xml.transform.SourceLocator
-
getSystemId
public java.lang.String getSystemId(int locationId)
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.
-
-