java.io.Serializable, javax.xml.transform.SourceLocator, LocationProvider, SaxonLocator, org.xml.sax.Locatorpublic class ExpressionLocation extends java.lang.Object implements SaxonLocator, java.io.Serializable
| Constructor | Description |
|---|---|
ExpressionLocation() |
Create an ExpressionLocation
|
ExpressionLocation(java.lang.String systemId,
int lineNumber,
int columnNumber) |
Create an ExpressionLocation corresponding to a given module, line number, and column number
|
ExpressionLocation(javax.xml.transform.SourceLocator loc) |
Create an ExpressionLocation, taking the data from a supplied JAXP SourceLocator
|
ExpressionLocation(LocationProvider provider,
long locationId) |
Create an ExpressionLocation, taking the data from a supplied locationId along with a
LocationProvider to interpret its meaning
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
getColumnNumber() |
Get the column number
|
int |
getColumnNumber(long locationId) |
Get the column number within the document 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
|
java.lang.String |
getPublicId() |
Get the Public ID
|
static SaxonLocator |
getSourceLocator(long locationId,
LocationProvider locationProvider) |
Construct an object holding location information for a validation error message
|
java.lang.String |
getSystemId() |
Get the system ID (the module URI)
|
java.lang.String |
getSystemId(long locationId) |
Get the system Id corresponding to a given location Id
|
static ExpressionLocation |
makeFromSax(org.xml.sax.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(java.lang.String systemId) |
Set the systemId (the module URI)
|
static java.lang.String |
truncateURI(java.lang.String uri) |
Truncate a URI to its last component
|
public ExpressionLocation()
public ExpressionLocation(javax.xml.transform.SourceLocator loc)
loc - the JAXP SourceLocatorpublic ExpressionLocation(LocationProvider provider, long locationId)
provider - the LocationProviderlocationId - the locationIdpublic ExpressionLocation(java.lang.String systemId,
int lineNumber,
int columnNumber)
systemId - the module URIlineNumber - the line numbercolumnNumber - the column numberpublic static ExpressionLocation makeFromSax(org.xml.sax.Locator loc)
loc - the SAX Locatorpublic java.lang.String getSystemId()
getSystemId in interface org.xml.sax.LocatorgetSystemId in interface javax.xml.transform.SourceLocatorpublic java.lang.String getPublicId()
getPublicId in interface org.xml.sax.LocatorgetPublicId in interface javax.xml.transform.SourceLocatorpublic int getLineNumber()
getLineNumber in interface org.xml.sax.LocatorgetLineNumber in interface javax.xml.transform.SourceLocatorpublic int getColumnNumber()
getColumnNumber in interface org.xml.sax.LocatorgetColumnNumber in interface javax.xml.transform.SourceLocatorpublic void setSystemId(java.lang.String systemId)
systemId - the systemIdpublic void setLineNumber(int lineNumber)
lineNumber - the line number within the modulepublic void setColumnNumber(int columnNumber)
columnNumber - the column numberpublic java.lang.String getSystemId(long locationId)
getSystemId in interface LocationProviderlocationId - the location Idpublic int getLineNumber(long locationId)
getLineNumber in interface LocationProviderlocationId - the location Idpublic int getColumnNumber(long locationId)
LocationProvidergetColumnNumber in interface LocationProviderlocationId - 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 locationIdpublic static java.lang.String truncateURI(java.lang.String uri)
uri - the URI to be truncated