public class EncodeForUri extends ScalarSystemFunction
ZERO_LENGTH_STRING
Constructor and Description |
---|
EncodeForUri() |
Modifier and Type | Method and Description |
---|---|
static void |
checkPercentEncoding(String uri)
Check that any percent-encoding within a URI is well-formed.
|
static CharSequence |
escape(CharSequence s,
String allowedPunctuation)
Escape special characters in a URI.
|
AtomicValue |
evaluate(Item arg,
XPathContext context)
Abstract method that must be supplied in subclasses to perform the evaluation
|
ZeroOrOne<? extends AtomicValue> |
resultWhenEmpty()
Method that may be supplied in subclasses, to indicate the result that is returned
when an empty sequence is supplied as the argument value.
|
call, makeFunctionCall
equals, export, exportAttributes, getArity, getCardinality, getContextNode, getDescription, getDetails, getErrorCodeForTypeErrors, getExpressionCompiler, getFunctionItemType, getFunctionName, getIntegerBounds, getOperandRoles, getRequiredType, getResultItemType, getResultItemType, getRetainedStaticContext, getSpecialProperties, getStaticBaseUriString, getStreamingAdjunct, importAttributes, makeCall, makeFunction, makeOptimizedFunctionCall, resultIfEmpty, setArity, setDetails, setRetainedStaticContext, supplyTypeInformation, typeCheckCaller
atomize, deepEquals, effectiveBooleanValue, getStringValue, getStringValueCS, isArray, isMap, optimize, simplify, typeCheck
getLength, head, itemAt, iterate, reduce, subsequence
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLength, head, itemAt, reduce, subsequence
public AtomicValue evaluate(Item arg, XPathContext context) throws XPathException
ScalarSystemFunction
evaluate
in class ScalarSystemFunction
arg
- the supplied argumentcontext
- the dynamic contextXPathException
- if a dynamic error occurspublic ZeroOrOne<? extends AtomicValue> resultWhenEmpty()
ScalarSystemFunction
resultWhenEmpty
in class ScalarSystemFunction
public static CharSequence escape(CharSequence s, String allowedPunctuation)
s
- the URI to be escapedallowedPunctuation
- ASCII characters other than letters and digits that
should NOT be %HH-encodedpublic static void checkPercentEncoding(String uri) throws XPathException
uri
- the string to be checked for validityXPathException
- if the string is not validly percent-encodedCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.