org.ucl.xpath.function
Class FnDoc

java.lang.Object
  extended byorg.ucl.xpath.function.Function
      extended byorg.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].


Field Summary
 
Fields inherited from class org.ucl.xpath.function.Function
_arity, _fl, _name
 
Constructor Summary
FnDoc()
          Constructor for FnDoc.
 
Method Summary
static ResultSequence doc(java.util.Collection args, DynamicContext dc)
          Doc operation.
 ResultSequence evaluate(java.util.Collection args)
          Evaluate arguments.
static java.util.Collection expected_args()
          Obtain a list of expected arguments.
 
Methods inherited from class org.ucl.xpath.function.Function
arity, convert_argument, convert_arguments, dynamic_context, name, set_function_library, signature, signature, signature, static_context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FnDoc

public FnDoc()
Constructor for FnDoc.

Method Detail

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.