+ * Based on the XPath 3.1 + * fn:name + * function. + * + * @param arg + * the node item to get the name for + * @param staticContext + * the static context used to resolve the namespace prefix + * @return the name of the node if it has one, or an empty string otherwise + */ + @NonNull + public static String fnName(@NonNull INodeItem arg, @NonNull StaticContext staticContext) { + return arg instanceof IDefinitionNodeItem + ? ((IDefinitionNodeItem, ?>) arg).getQName().toEQName(staticContext) + : ""; + } + + private FnName() { + // disable construction + } +}