Package org.zkoss.xml
Class Locators
- java.lang.Object
-
- org.zkoss.xml.Locators
-
public class Locators extends java.lang.Object
Utilities to handleLocator
.- Since:
- 6.0.0
- Author:
- tomyeh
-
-
Constructor Summary
Constructors Constructor Description Locators()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
format(java.lang.String message, java.lang.String pubId, java.lang.String sysId, int lineno, int colno)
Formats the message with the location information.static java.lang.String
format(java.lang.String message, javax.xml.transform.SourceLocator loc)
Formats the message with the location information.static java.lang.String
format(java.lang.String message, org.xml.sax.Locator loc)
Formats the message with the location information.static java.lang.String
format(java.lang.String message, Locator loc)
Formats the message with the location information.static Location
toLocation(javax.xml.transform.SourceLocator loc)
Converts an instance ofSourceLocator
toLocation
.static Location
toLocation(org.xml.sax.Locator loc)
Converts an instance ofLocator
toLocation
.static Location
toLocation(Locator loc)
-
-
-
Method Detail
-
format
public static java.lang.String format(java.lang.String message, Locator loc)
Formats the message with the location information.- Parameters:
loc
- the location information. Ignored if null.
-
format
public static java.lang.String format(java.lang.String message, org.xml.sax.Locator loc)
Formats the message with the location information.- Parameters:
loc
- the location information. Ignored if null.
-
format
public static java.lang.String format(java.lang.String message, javax.xml.transform.SourceLocator loc)
Formats the message with the location information.- Parameters:
loc
- the location information. Ignored if null.
-
format
public static java.lang.String format(java.lang.String message, java.lang.String pubId, java.lang.String sysId, int lineno, int colno)
Formats the message with the location information.- Parameters:
pubId
- the public ID (ignored if null)sysId
- the system ID (ignored if null)lineno
- the line number (ignored if negative)colno
- the line number (ignored if negative)
-
toLocation
public static Location toLocation(org.xml.sax.Locator loc)
Converts an instance ofLocator
toLocation
. If loc is null, this method returns null.
-
-