org.ucl.xpath.function
Class FnBaseUri
java.lang.Object
org.ucl.xpath.function.Function
org.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.
Constructor Summary |
FnBaseUri()
Constructor for FnBaseUri. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FnBaseUri
public FnBaseUri()
- Constructor for FnBaseUri.
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.