org.apache.xml.utils
public class SystemIDResolver extends Object
This is a generic utility for resolving URIs, other than the fact that it's declared to throw TransformerException. Please see code comments for details on how resolution is performed.
UNKNOWN: internal
Method Summary | |
---|---|
static String | getAbsoluteURI(String systemId)
Take a SystemID string and try to turn it into a good absolute URI.
|
static String | getAbsoluteURI(String urlString, String base)
Take a SystemID string and try to turn it into a good absolute URI.
|
static String | getAbsoluteURIFromRelative(String localPath)
Get an absolute URI from a given relative URI (local path).
|
static boolean | isAbsolutePath(String systemId)
Return true if the local path is an absolute path.
|
static boolean | isAbsoluteURI(String systemId)
Return true if the systemId denotes an absolute URI .
|
Parameters: systemId A URI string, which may be absolute or relative.
Returns: The resolved absolute URI
Parameters: urlString SystemID string base The URI string used as the base for resolving the systemID
Returns: The resolved absolute URI
Throws: TransformerException thrown if the string can't be turned into a URI.
The relative URI is a local filesystem path. The path can be absolute or relative. If it is a relative path, it is resolved relative to the system property "user.dir" if it is available; if not (i.e. in an Applet perhaps which throws SecurityException) then we just return the relative path. The space and backslash characters are also replaced to generate a good absolute URI.
Parameters: localPath The relative URI to resolve
Returns: Resolved absolute URI
Parameters: systemId The path string
Returns: true if the path is absolute
Parameters: systemId The systemId string
Returns: true if the systemId is an an absolute URI