public class ResolveURI extends SystemFunction
| Constructor and Description |
|---|
ResolveURI() |
| Modifier and Type | Method and Description |
|---|---|
ZeroOrOne<AnyURIValue> |
call(XPathContext context,
Sequence[] arguments)
Evaluate the expression
|
static String |
escapeSpaces(String s)
Replace spaces by %20
|
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.
|
static String |
unescapeSpaces(String uri)
Replace %20 by space
|
equals, export, exportAttributes, getArity, getCardinality, getContextNode, getDescription, getDetails, getErrorCodeForTypeErrors, getExpressionCompiler, getFunctionItemType, getFunctionName, getIntegerBounds, getOperandRoles, getRequiredType, getResultItemType, getResultItemType, getRetainedStaticContext, getSpecialProperties, getStaticBaseUriString, getStreamingAdjunct, importAttributes, makeCall, makeFunction, makeFunctionCall, makeOptimizedFunctionCall, resultIfEmpty, setArity, setDetails, setRetainedStaticContext, supplyTypeInformation, typeCheckCalleratomize, deepEquals, effectiveBooleanValue, getStringValue, getStringValueCS, isArray, isMap, optimize, simplify, typeCheckgetLength, head, itemAt, iterate, reduce, subsequenceclone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLength, head, itemAt, reduce, subsequencepublic ZeroOrOne<AnyURIValue> call(XPathContext context, Sequence[] arguments) throws XPathException
context - the dynamic evaluation contextarguments - the values of the arguments, supplied as SequenceIteratorsXPathException - if a dynamic error occurs during the evaluation of the expressionpublic static String tryToExpand(String systemId)
systemId - the supplied systemId. Null is treated as equivalent to ""public static URI makeAbsolute(String relativeURI, String base) throws URISyntaxException
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.
relativeURI - the relative URI. Null is permitted provided that the base URI is an absolute URIbase - the base URI. Null is permitted provided that relativeURI is an absolute URIURISyntaxException - if either of the strings is not a valid URI or
if the resolution failspublic static String escapeSpaces(String s)
s - the input stringCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.