|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.event.LocationCopier
public class LocationCopier
A Receiver that can be inserted into an event pipeline to copy location information. The class acts as a LocationProvider, so it supports getSystemId() and getLineNumber() methods; the location returned can vary for each node, and is set by the class generating the events. The class is used when it is necessary to copy a subtree along with its location information; for example, when copying an inline schema within a stylesheet to a separate schema document.
Note: prior to 9.2, the LocationCopier was a ProxyReceiver that passed all events on the pipeline unchanged. It no longer does this, instead it is found as the LocationProvider on a pipeline, but does not itself see the pipeline events.
Constructor Summary | |
---|---|
LocationCopier(boolean wholeDocument)
|
Method Summary | |
---|---|
int |
getColumnNumber(long locationId)
Get the column number within the document, entity, or module containing a particular location |
int |
getLineNumber(long locationId)
Get the line number within the document, entity or module containing a particular location |
String |
getSystemId(long locationId)
Get the URI of the document, entity, or module containing a particular location |
int |
notifyElementNode(NodeInfo element)
Provide information about the node being copied. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocationCopier(boolean wholeDocument)
Method Detail |
---|
public int notifyElementNode(NodeInfo element)
notifyElementNode
in interface CopyInformee
element
- the node being copied, which must be an element node
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 |