Package net.sf.saxon.expr
Class ExpressionLocation
java.lang.Object
net.sf.saxon.expr.ExpressionLocation
- All Implemented Interfaces:
Serializable
,SourceLocator
,LocationProvider
,SaxonLocator
,Locator
Class to hold details of the location of an expression, of an error in a source file, etc.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionExpressionLocation
(String systemId, int lineNumber, int columnNumber) ExpressionLocation
(LocationProvider provider, int locationId) -
Method Summary
Modifier and TypeMethodDescriptionint
int
int
getLineNumber
(int locationId) Get the line number within the document or module containing a particular locationstatic SaxonLocator
getSourceLocator
(int locationId, LocationProvider locationProvider) Construct an object holding location information for a validation error messagegetSystemId
(int locationId) Get the URI of the document or module containing a particular locationvoid
setColumnNumber
(int columnNumber) void
setLineNumber
(int lineNumber) void
setPublicId
(String publicId) void
setSystemId
(String systemId) static String
truncateURI
(String uri) Truncate a URI to its last component
-
Constructor Details
-
ExpressionLocation
public ExpressionLocation() -
ExpressionLocation
-
ExpressionLocation
-
ExpressionLocation
-
-
Method Details
-
getSystemId
- Specified by:
getSystemId
in interfaceLocator
- Specified by:
getSystemId
in interfaceSourceLocator
-
getPublicId
- Specified by:
getPublicId
in interfaceLocator
- Specified by:
getPublicId
in interfaceSourceLocator
-
getLineNumber
public int getLineNumber()- Specified by:
getLineNumber
in interfaceLocator
- Specified by:
getLineNumber
in interfaceSourceLocator
-
getColumnNumber
public int getColumnNumber()- Specified by:
getColumnNumber
in interfaceLocator
- Specified by:
getColumnNumber
in interfaceSourceLocator
-
setSystemId
-
setPublicId
-
setLineNumber
public void setLineNumber(int lineNumber) -
setColumnNumber
public void setColumnNumber(int columnNumber) -
getSystemId
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.
-
getSourceLocator
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
Truncate a URI to its last component
-