public class Loc extends java.lang.Object implements Location
Constructor and Description |
---|
Loc(javax.xml.transform.SourceLocator loc)
Create an ExpressionLocation, taking the data from a supplied JAXP SourceLocator
|
Loc(java.lang.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 |
getLineNumber()
Get the line number
|
java.lang.String |
getPublicId()
Get the Public ID
|
java.lang.String |
getSystemId()
Get the system ID (the module URI)
|
static boolean |
isUnknown(Location location)
Ask whether this is an "unknown location"
|
static Loc |
makeFromSax(org.xml.sax.Locator loc)
Create an ExpressionLocation, taking the data from a supplied SAX Locator
|
Location |
saveLocation()
Get an immutable copy of this Location object.
|
public static Loc NONE
public Loc(javax.xml.transform.SourceLocator loc)
loc
- the JAXP SourceLocatorpublic Loc(java.lang.String systemId, int lineNumber, int columnNumber)
systemId
- the module URIlineNumber
- the line number (starting at 1; -1 means unknown)columnNumber
- the column number (starting at 1; -1 means unknown)public static Loc makeFromSax(org.xml.sax.Locator loc)
loc
- the SAX Locatorpublic java.lang.String getSystemId()
getSystemId
in interface javax.xml.transform.SourceLocator
getSystemId
in interface Location
getSystemId
in interface org.xml.sax.Locator
public java.lang.String getPublicId()
getPublicId
in interface javax.xml.transform.SourceLocator
getPublicId
in interface Location
getPublicId
in interface org.xml.sax.Locator
public int getLineNumber()
getLineNumber
in interface javax.xml.transform.SourceLocator
getLineNumber
in interface Location
getLineNumber
in interface org.xml.sax.Locator
public int getColumnNumber()
getColumnNumber
in interface javax.xml.transform.SourceLocator
getColumnNumber
in interface Location
getColumnNumber
in interface org.xml.sax.Locator
public Location saveLocation()
saveLocation
in interface Location
public static boolean isUnknown(Location location)
location
- a locationCopyright (c) 2004-2022 Saxonica Limited. All rights reserved.