Package org.jaxen.function
Class NamespaceUriFunction
java.lang.Object
org.jaxen.function.NamespaceUriFunction
- All Implemented Interfaces:
Function
4.1
string namespace-uri(node-set?)
The namespace-uri function returns the namespace URI of the expanded-name of the node in the argument node-set that is first in document order. If the argument node-set is empty, the first node has no expanded-name, or the namespace URI of the expanded-name is null, an empty string is returned. If the argument is omitted, it defaults to a node-set with the context node as its only member.
NOTE: The string returned by the namespace-uri function will be empty except for element nodes and attribute nodes.
- Author:
- bob mcwhirter (bob @ werken.com)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
NamespaceUriFunction
public NamespaceUriFunction()Create a newNamespaceUriFunction
object.
-
-
Method Details
-
call
Returns the namespace URI of the specified node or the namespace URI of the context node if no arguments are provided.- Specified by:
call
in interfaceFunction
- Parameters:
context
- the context at the point in the expression where the function is calledargs
- aList
containing zero or one items- Returns:
- a
String
containing the namespace URI - Throws:
FunctionCallException
- ifargs
has more than one item
-