net.sf.saxon.expr
Class ExpressionLocation
java.lang.Object
net.sf.saxon.expr.ExpressionLocation
- All Implemented Interfaces:
- java.io.Serializable, javax.xml.transform.SourceLocator, LocationProvider, SaxonLocator, org.xml.sax.Locator
public class ExpressionLocation
- extends java.lang.Object
- implements SaxonLocator, java.io.Serializable
Class to hold details of the location of an expression, of an error in a source file, etc.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExpressionLocation
public ExpressionLocation()
ExpressionLocation
public ExpressionLocation(javax.xml.transform.SourceLocator loc)
ExpressionLocation
public ExpressionLocation(LocationProvider provider,
int locationId)
ExpressionLocation
public ExpressionLocation(java.lang.String systemId,
int lineNumber,
int columnNumber)
getSystemId
public java.lang.String getSystemId()
- Specified by:
getSystemId
in interface javax.xml.transform.SourceLocator
- Specified by:
getSystemId
in interface org.xml.sax.Locator
getPublicId
public java.lang.String getPublicId()
- Specified by:
getPublicId
in interface javax.xml.transform.SourceLocator
- Specified by:
getPublicId
in interface org.xml.sax.Locator
getLineNumber
public int getLineNumber()
- Specified by:
getLineNumber
in interface javax.xml.transform.SourceLocator
- Specified by:
getLineNumber
in interface org.xml.sax.Locator
getColumnNumber
public int getColumnNumber()
- Specified by:
getColumnNumber
in interface javax.xml.transform.SourceLocator
- Specified by:
getColumnNumber
in interface org.xml.sax.Locator
setSystemId
public void setSystemId(java.lang.String systemId)
setPublicId
public void setPublicId(java.lang.String publicId)
setLineNumber
public void setLineNumber(int lineNumber)
setColumnNumber
public void setColumnNumber(int columnNumber)
getSystemId
public java.lang.String getSystemId(int locationId)
- Specified by:
getSystemId
in interface LocationProvider
getLineNumber
public int getLineNumber(int locationId)
- Specified by:
getLineNumber
in interface LocationProvider
getSourceLocator
public static SaxonLocator getSourceLocator(int locationId,
LocationProvider locationProvider)
- Construct an object holding location information for a validation error message
- Parameters:
locationId
- The locationId as supplied with an event such as startElement or attributelocationProvider
- The object that understands how to interpret the locationId
- Returns:
- a SaxonLocator containing the location information
truncateURI
public static java.lang.String truncateURI(java.lang.String uri)
- Truncate a URI to its last component