public class ExpressionLocation extends Object implements SaxonLocator, Serializable
Constructor and Description |
---|
ExpressionLocation()
Create an ExpressionLocation
|
ExpressionLocation(LocationProvider provider,
long locationId)
Create an ExpressionLocation, taking the data from a supplied locationId along with a
LocationProvider to interpret its meaning
|
ExpressionLocation(SourceLocator loc)
Create an ExpressionLocation, taking the data from a supplied JAXP SourceLocator
|
ExpressionLocation(String systemId,
int lineNumber,
int columnNumber)
Create an ExpressionLocation corresponding to a given module, line number, and column number
|
Modifier and Type | Method and Description |
---|---|
int |
getColumnNumber()
Get the column number
|
int |
getColumnNumber(long locationId)
Get the column number within the document, entity, or module containing a particular location
|
int |
getLineNumber()
Get the line number
|
int |
getLineNumber(long locationId)
Get the line number corresponding to a given location Id
|
String |
getPublicId()
Get the Public ID
|
static SaxonLocator |
getSourceLocator(long locationId,
LocationProvider locationProvider)
Construct an object holding location information for a validation error message
|
String |
getSystemId()
Get the system ID (the module URI)
|
String |
getSystemId(long locationId)
Get the system Id corresponding to a given location Id
|
static ExpressionLocation |
makeFromSax(Locator loc)
Create an ExpressionLocation, taking the data from a supplied SAX Locator
|
void |
setColumnNumber(int columnNumber)
Set the column number
|
void |
setLineNumber(int lineNumber)
Set the line number
|
void |
setSystemId(String systemId)
Set the systemId (the module URI)
|
public ExpressionLocation()
public ExpressionLocation(SourceLocator loc)
loc
- the JAXP SourceLocatorpublic ExpressionLocation(LocationProvider provider, long locationId)
provider
- the LocationProviderlocationId
- the locationIdpublic ExpressionLocation(String systemId, int lineNumber, int columnNumber)
systemId
- the module URIlineNumber
- the line numbercolumnNumber
- the column numberpublic static ExpressionLocation makeFromSax(Locator loc)
loc
- the SAX Locatorpublic String getSystemId()
getSystemId
in interface SourceLocator
getSystemId
in interface Locator
public String getPublicId()
getPublicId
in interface SourceLocator
getPublicId
in interface Locator
public int getLineNumber()
getLineNumber
in interface SourceLocator
getLineNumber
in interface Locator
public int getColumnNumber()
getColumnNumber
in interface SourceLocator
getColumnNumber
in interface Locator
public void setSystemId(String systemId)
systemId
- the systemIdpublic void setLineNumber(int lineNumber)
lineNumber
- the line number within the modulepublic void setColumnNumber(int columnNumber)
columnNumber
- the column numberpublic String getSystemId(long locationId)
getSystemId
in interface LocationProvider
locationId
- the location Idpublic int getLineNumber(long locationId)
getLineNumber
in interface LocationProvider
locationId
- the location Idpublic int getColumnNumber(long locationId)
LocationProvider
getColumnNumber
in interface LocationProvider
locationId
- identifier of the location in question (as passed down the Receiver pipeline)public static SaxonLocator getSourceLocator(long locationId, LocationProvider locationProvider)
locationId
- The locationId as supplied with an event such as startElement or attributelocationProvider
- The object that understands how to interpret the locationIdCopyright (c) 2004-2013 Saxonica Limited. All rights reserved.