net.sf.saxon.functions
public class ResolveURI extends SystemFunction
Field Summary | |
---|---|
String | expressionBaseURI |
Method Summary | |
---|---|
void | checkArguments(ExpressionVisitor visitor) |
Expression | copy()
Copy an expression. |
static String | escapeSpaces(String s)
Replace spaces by %20 |
Item | evaluateItem(XPathContext context)
Evaluate the function at run-time |
String | getStaticBaseURI()
Get the static base URI of the expression |
static URI | makeAbsolute(String relativeURI, String base)
Construct an absolute URI from a relative URI and a base URI. |
static String | tryToExpand(String systemId)
If a system ID can't be parsed as a URL, try to expand it as a relative
URI using the current directory as the base URI. |
Returns: the copy of the original expression
new URL(baseURL, relativeURL)
.
Spaces in either URI are converted to %20
If no base URI is available, and the relative URI is not an absolute URI, then the current directory is used as a base URI.
Parameters: relativeURI the relative URI. Null is permitted provided that the base URI is an absolute URI base the base URI. Null is permitted provided that relativeURI is an absolute URI
Returns: the absolutized URI
Throws: java.net.URISyntaxException if either of the strings is not a valid URI or if the resolution fails