Package net.sf.saxon.event
Class LocationCopier
- java.lang.Object
-
- net.sf.saxon.event.SequenceReceiver
-
- net.sf.saxon.event.ProxyReceiver
-
- net.sf.saxon.event.LocationCopier
-
- All Implemented Interfaces:
javax.xml.transform.Result
,LocationProvider
,Receiver
public class LocationCopier extends ProxyReceiver implements LocationProvider
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.
-
-
Field Summary
Fields Modifier and Type Field Description int
lineNumber
-
Fields inherited from class net.sf.saxon.event.ProxyReceiver
nextReceiver
-
Fields inherited from class net.sf.saxon.event.SequenceReceiver
pipelineConfiguration, previousAtomic, systemId
-
-
Constructor Summary
Constructors Constructor Description LocationCopier()
-
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(int locationId)
Get the URI of the document or module containing a particular locationvoid
setLineNumber(int lineNumber)
void
setPipelineConfiguration(PipelineConfiguration pipe)
Set the pipeline configuration-
Methods inherited from class net.sf.saxon.event.ProxyReceiver
attribute, characters, close, comment, endDocument, endElement, getConfiguration, getDocumentLocator, getNamePool, getUnderlyingReceiver, namespace, open, processingInstruction, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startContent, startDocument, startElement
-
Methods inherited from class net.sf.saxon.event.SequenceReceiver
append, getPipelineConfiguration, getSystemId
-
-
-
-
Method Detail
-
setPipelineConfiguration
public void setPipelineConfiguration(PipelineConfiguration pipe)
Description copied from interface:Receiver
Set the pipeline configuration- Specified by:
setPipelineConfiguration
in interfaceReceiver
- Overrides:
setPipelineConfiguration
in classProxyReceiver
-
setLineNumber
public void setLineNumber(int lineNumber)
-
getColumnNumber
public int getColumnNumber()
-
getLineNumber
public int getLineNumber()
-
getPublicId
public java.lang.String getPublicId()
-
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.
-
-