Package net.sf.saxon.event
Class ReceivingContentHandler.LocalLocator
java.lang.Object
net.sf.saxon.event.ReceivingContentHandler.LocalLocator
- All Implemented Interfaces:
SourceLocator,Location,Locator
- Enclosing class:
ReceivingContentHandler
An implementation of the Saxon
Location interface that wraps the SAX Locator
information. Note that this object is mutable and changes continually as parsing proceeds;
it is therefore necessary to call its saveLocation() method to obtain an
immutable location that still has meaning once parsing is finished.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintReturn the character position where the current document event ends.intReturn the line number where the current document event ends.Return the public identifier for the current document event.Return the system identifier for the current document event.Get an immutable copy of this Location object.
-
Field Details
-
levelInEntity
public int levelInEntity
-
-
Method Details
-
getSystemId
Return the system identifier for the current document event.- Specified by:
getSystemIdin interfaceLocation- Specified by:
getSystemIdin interfaceLocator- Specified by:
getSystemIdin interfaceSourceLocator- Returns:
- A string containing the system identifier, or null if none is available.
-
getPublicId
Return the public identifier for the current document event.- Specified by:
getPublicIdin interfaceLocation- Specified by:
getPublicIdin interfaceLocator- Specified by:
getPublicIdin interfaceSourceLocator- Returns:
- A string containing the public identifier, or null if none is available.
-
getLineNumber
public int getLineNumber()Return the line number where the current document event ends.- Specified by:
getLineNumberin interfaceLocation- Specified by:
getLineNumberin interfaceLocator- Specified by:
getLineNumberin interfaceSourceLocator- Returns:
- The line number, or -1 if none is available.
-
getColumnNumber
public int getColumnNumber()Return the character position where the current document event ends.- Specified by:
getColumnNumberin interfaceLocation- Specified by:
getColumnNumberin interfaceLocator- Specified by:
getColumnNumberin interfaceSourceLocator- Returns:
- The column number, or -1 if none is available.
-
saveLocation
Get an immutable copy of this Location object. By default Location objects may be mutable, so they should not be saved for later use. The result of this operation holds the same location information, but in an immutable form.- Specified by:
saveLocationin interfaceLocation- Returns:
- an immutable copy (which may be the original object, if it is already immutable)
-