Getting the value of the new identity-(DM)property of a function. fn:function-identity
#1798
Labels
Feature
A change that introduces a new feature
PR Pending
A PR has been raised to resolve this issue
XDM
An issue related to the XPath Data Model
XPath
An issue related to XPath
XQFO
An issue related to Functions and Operators
The current set of Functions on Functions: at (https://qt4cg.org/specifications/xpath-functions-40/Overview.html#functions-on-functions) was recently updated with a new function to produce all annotations for a given function: fn:function-annotations.
However we are still missing the ability to reference another important, newly-added property of a function: the function identity: in DM and in XPath.
fn:function-identity
Summary
Returns the identity of the function item.
Signature
Properties
This function is ·deterministic·, ·context-independent·, and ·focus-independent·.
Notes
What unique key is needed under which to group all invocations of a specific function and then the mapping between their function-call arguments and the result of the call? Remarkably, the identity of a function fits exactly the requirements (uniqueness / one per function) for such a key.
As we already have a function-identity property in the Data Model for each function-item, it is straightforward to provide this identity, and the
fn:function-identity
does exactly that.xs
,fn
,map
,array
,math
,err
,output
) can be assigned permanent identities in the official Specs documents, requiring every implementation to use exactly this published identity value for the official, system functions, thus achieving efficiency and convenience during debugging.$f1
and$f2
, then they are the same if and only if:function-identity($f1) eq function-identity($f2)
The text was updated successfully, but these errors were encountered: