org.ucl.xpath.function
Class FnBaseUri

java.lang.Object
  extended byorg.ucl.xpath.function.Function
      extended byorg.ucl.xpath.function.FnBaseUri

public class FnBaseUri
extends Function

Returns the value of the base-uri property for $arg as defined by the accessor function dm:base-uri() for that kind of node in Section 5.1 base-uri Accessor of the specification. If $arg is the empty sequence, the empty sequence is returned. Document, element and processing-instruction nodes have a base-uri property which may be empty. The base-uri property of all other node types is the empty sequence. The value of the base-uri property is returned if it exists and is not empty. Otherwise, if the node has a parent, the value of dm:base-uri() applied to its parent is returned, recursively. If the node does not have a parent, or if the recursive ascent up the ancestor chain encounters a node whose base-uri property is empty and it does not have a parent, the empty sequence is returned.


Field Summary
 
Fields inherited from class org.ucl.xpath.function.Function
_arity, _fl, _name
 
Constructor Summary
FnBaseUri()
          Constructor for FnBaseUri.
 
Method Summary
static ResultSequence base_uri(java.util.Collection args)
          Base-Uri 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

FnBaseUri

public FnBaseUri()
Constructor for FnBaseUri.

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.

base_uri

public static ResultSequence base_uri(java.util.Collection args)
                               throws DynamicError
Base-Uri operation.

Parameters:
args - Result from the expressions evaluation.
Returns:
Result of fn:base-uri operation.
Throws:
DynamicError - Dynamic error.

expected_args

public static java.util.Collection expected_args()
Obtain a list of expected arguments.

Returns:
Result of operation.