public class LocalNameFunction extends java.lang.Object implements Function
4.1 string local-name(node-set?)
The local-name function returns the local part 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 or the first node has no expanded-name, an empty string is returned. If the argument is omitted, it defaults to a node-set with the context node as its only member.
Constructor and Description |
---|
LocalNameFunction()
Create a new
LocalNameFunction object. |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
call(Context context,
java.util.List args)
Returns the local-name of the specified node or the context node if
no arguments are provided.
|
static java.lang.String |
evaluate(java.util.List list,
Navigator nav)
Returns the local-name of
list.get(0) |
public LocalNameFunction()
LocalNameFunction
object.public java.lang.Object call(Context context, java.util.List args) throws FunctionCallException
call
in interface Function
context
- the context at the point in the
expression where the function is calledargs
- a List
containing zero or one itemsString
containing the local-nameFunctionCallException
- if args
has more than one itempublic static java.lang.String evaluate(java.util.List list, Navigator nav) throws FunctionCallException
list.get(0)
list
- a list of nodesnav
- the Navigator
used to retrieve the local namelist.get(0)
FunctionCallException
- if list.get(0)
is not a node