## net.sf.saxon.expr
Class ExpressionLocation

    java.lang.Object
      net.sf.saxon.expr.ExpressionLocation

All Implemented Interfaces:
  Serializable, SourceLocator, LocationProvider, SaxonLocator, Locator

    public class ExpressionLocation

extends Object
implements SaxonLocator, Serializable

Class to hold details of the location of an expression, of an error in a source file, etc.

See Also:
  Serialized Form

Constructor Summary
`ExpressionLocation()`
`ExpressionLocation(LocationProvider provider, int locationId)`
`ExpressionLocation(SourceLocator loc)`
`ExpressionLocation(String systemId, int lineNumber, int columnNumber)`

Method Summary
`int` `getColumnNumber()`
`int` `getLineNumber()`
`int` `getLineNumber(int locationId)` Get the line number within the document or module containing a particular location
`String` `getPublicId()`
`static SaxonLocator` `getSourceLocator(int locationId, LocationProvider locationProvider)` Construct an object holding location information for a validation error message
`String` `getSystemId()`
`String` `getSystemId(int locationId)` Get the URI of the document or module containing a particular location
`void` `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

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ExpressionLocation

    public ExpressionLocation()

### ExpressionLocation

    public ExpressionLocation(SourceLocator loc)

### ExpressionLocation

    public ExpressionLocation(LocationProvider provider,
                              int locationId)

### ExpressionLocation

    public ExpressionLocation(String systemId,
                              int lineNumber,
                              int columnNumber)

Method Detail

### getSystemId

    public String getSystemId()

  Specified by:
    `getSystemId` in interface `SourceLocator`
  Specified by:
    `getSystemId` in interface `Locator`

### getPublicId

    public String getPublicId()

  Specified by:
    `getPublicId` in interface `SourceLocator`
  Specified by:
    `getPublicId` in interface `Locator`

### getLineNumber

    public int getLineNumber()

  Specified by:
    `getLineNumber` in interface `SourceLocator`
  Specified by:
    `getLineNumber` in interface `Locator`

### getColumnNumber

    public int getColumnNumber()

  Specified by:
    `getColumnNumber` in interface `SourceLocator`
  Specified by:
    `getColumnNumber` in interface `Locator`

### setSystemId

    public void setSystemId(String systemId)

### setPublicId

    public void setPublicId(String publicId)

### setLineNumber

    public void setLineNumber(int lineNumber)

### setColumnNumber

    public void setColumnNumber(int columnNumber)

### getSystemId

    public 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 interface `LocationProvider`
  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 interface `LocationProvider`
  Parameters:
    `locationId` - identifier of the location in question (as passed down the Receiver pipeline)
  Returns:
    the line number within the document or module.

### 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 attribute
    `locationProvider` - The object that understands how to interpret the locationId
  Returns:
    a SaxonLocator containing the location information

### truncateURI

    public static String truncateURI(String uri)

  Truncate a URI to its last component

Copyright (C) Michael H. Kay. All rights reserved.