|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.dom.DOMSender
public class DOMSender
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 | |
---|---|
protected Node |
root
|
protected String |
systemId
|
Constructor Summary | |
---|---|
DOMSender(Node startNode,
Receiver receiver)
Create a DOMSender that will send events representing the nodes in a tree to a nominated 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()
Walk a tree (traversing the nodes depth first). |
void |
setSystemId(String systemId)
Set the systemId of the source document (which will also be used for the destination) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Node root
protected String systemId
Constructor Detail |
---|
public DOMSender(Node startNode, Receiver receiver)
startNode
- the root node of the tree to be send. Usually a document or element node.receiver
- the object to be notified of the resulting events. The supplied Receiver must
be initialized with a PipelineConfiguration.The PipelineConfiguration
of the Receiver will be modified to set this DOMSender as its LocationProvider.Method Detail |
---|
public void setSystemId(String systemId)
systemId
- the systemId of the source documentpublic void send() throws XPathException
IllegalStateException
- if the
start node is of a node kind other than document, document fragment, element, text,
comment, or processing instruction (for example, if it is an attribute node).
XPathException
- On any error in the documentpublic int getColumnNumber()
getColumnNumber
in interface SourceLocator
getColumnNumber
in interface Locator
public int getLineNumber()
getLineNumber
in interface SourceLocator
getLineNumber
in interface Locator
public String getPublicId()
getPublicId
in interface SourceLocator
getPublicId
in interface Locator
public String getSystemId()
getSystemId
in interface SourceLocator
getSystemId
in interface Locator
public String getSystemId(long locationId)
LocationProvider
getSystemId
in interface LocationProvider
locationId
- identifier of the location in question (as passed down the Receiver pipeline)
public int getLineNumber(long locationId)
LocationProvider
getLineNumber
in interface LocationProvider
locationId
- identifier of the location in question (as passed down the Receiver pipeline)
public int getColumnNumber(long locationId)
LocationProvider
getColumnNumber
in interface LocationProvider
locationId
- identifier of the location in question (as passed down the Receiver pipeline)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |