Class NodeNameFunctionIterator

All Implemented Interfaces:
Serializable, LocalRuntimePlan<Item>

public class NodeNameFunctionIterator extends LocalFunctionCallIterator
Implementation of the fn:name function according to XQuery 3.1 specification. Returns the name of a node, as an xs:string that is either the zero-length string, or has the lexical form of an xs:QName. Function signatures:
  • fn:name() as xs:string
  • fn:name($arg as node()?) as xs:string
Rules:
  • If the argument is omitted, it defaults to the context item (.)
  • If the argument is supplied and is the empty sequence, the function returns the zero-length string
  • If the node identified by $arg has no name (that is, if it is a document node, a comment, a text node, or a namespace node having no name), the function returns the zero-length string
  • Otherwise, the function returns the value of the expression fn:string(fn:node-name($arg))
See Also:
  • Constructor Details

  • Method Details

    • createNativeCursor

      public Cursor<Item> createNativeCursor(DynamicContext context)
      Description copied from interface: LocalRuntimePlan
      Creates an independent cursor for one native local evaluation.
      Parameters:
      context - the dynamic context for that evaluation
      Returns:
      an unopened cursor