|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xml.utils.SystemIDResolver
This class is used to resolve relative URIs and SystemID strings into absolute URIs.
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.
Constructor Summary | |
SystemIDResolver()
|
Method Summary | |
static String |
getAbsoluteURI(String url)
Take a SystemID string and try and turn it into a good absolute URL. |
static String |
getAbsoluteURI(String urlString,
String base)
Take a SystemID string and try and turn it into a good absolute URL. |
static String |
getAbsoluteURIFromRelative(String uri)
Get absolute URI from a given relative URI. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SystemIDResolver()
Method Detail |
public static String getAbsoluteURIFromRelative(String uri)
The URI 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 it is currently resolved relative to "" or a blank string. Also replaces all backslashes with forward slashes.
uri
- Relative URI to resolve
public static String getAbsoluteURI(String url) throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerException
- thrown if the string can't be turned into a URL.public static String getAbsoluteURI(String urlString, String base) throws javax.xml.transform.TransformerException
urlString
- SystemID stringbase
- Base URI to use to resolve the given systemID
javax.xml.transform.TransformerException
- thrown if the string can't be turned into a URL.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |