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 TypeMethodDescriptionintintintgetLineNumber(int locationId) Get the line number within the document or module containing a particular locationstatic SaxonLocatorgetSourceLocator(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 locationvoidsetColumnNumber(int columnNumber) voidsetLineNumber(int lineNumber) voidsetPublicId(String publicId) voidsetSystemId(String systemId) static StringtruncateURI(String uri) Truncate a URI to its last component
-
Constructor Details
-
ExpressionLocation
public ExpressionLocation() -
ExpressionLocation
-
ExpressionLocation
-
ExpressionLocation
-
-
Method Details
-
getSystemId
- Specified by:
getSystemIdin interfaceLocator- Specified by:
getSystemIdin interfaceSourceLocator
-
getPublicId
- Specified by:
getPublicIdin interfaceLocator- Specified by:
getPublicIdin interfaceSourceLocator
-
getLineNumber
public int getLineNumber()- Specified by:
getLineNumberin interfaceLocator- Specified by:
getLineNumberin interfaceSourceLocator
-
getColumnNumber
public int getColumnNumber()- Specified by:
getColumnNumberin interfaceLocator- Specified by:
getColumnNumberin interfaceSourceLocator
-
setSystemId
-
setPublicId
-
setLineNumber
public void setLineNumber(int lineNumber) -
setColumnNumber
public void setColumnNumber(int columnNumber) -
getSystemId
Description copied from interface:LocationProviderGet the URI of the document or module containing a particular location- Specified by:
getSystemIdin 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:LocationProviderGet the line number within the document or module containing a particular location- Specified by:
getLineNumberin 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
-