org.ucl.xpath.function
Class FnDoc
java.lang.Object
org.ucl.xpath.function.Function
org.ucl.xpath.function.FnDoc
- public class FnDoc
- extends Function
Retrieves a document using an xs:anyURI supplied as an xs:string.
If $uri is not a valid xs:anyURI, an error is raised [err:FODC0005].
If it is a relative URI Reference, it is resolved relative to the value
of the base URI property from the static context. The resulting absolute
URI Reference is cast to an xs:string. If the Available documents discussed
in Section 2.1.2 Dynamic ContextXP provides a mapping from this string to
a document node, the function returns that document node. If the Available
documents maps the string to an empty sequence, then the function returns
an empty sequence. If the Available documents provides no mapping for the
string, an error is raised [err:FODC0005].
Constructor Summary |
FnDoc()
Constructor for FnDoc. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FnDoc
public FnDoc()
- Constructor for FnDoc.
evaluate
public ResultSequence evaluate(java.util.Collection args)
throws DynamicError
- Evaluate arguments.
- Specified by:
evaluate
in class Function
- Parameters:
args
- argument expressions.
- Returns:
- Result of evaluation.
- Throws:
DynamicError
- Dynamic error.
doc
public static ResultSequence doc(java.util.Collection args,
DynamicContext dc)
throws DynamicError
- Doc operation.
- Parameters:
args
- Result from the expressions evaluation.dc
- Result of dynamic context operation.
- Returns:
- Result of fn:doc operation.
- Throws:
DynamicError
- Dynamic error.
expected_args
public static java.util.Collection expected_args()
- Obtain a list of expected arguments.
- Returns:
- Result of operation.