You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to understand the semantics behind the Properties section in the XQFO spec. Here are some examples of existing functions:
fn:format-integer
The two-argument form of this function is ·deterministic·, ·context-dependent·, and ·focus-independent·. It depends on default language.
The three-argument form of this function is ·deterministic·, ·context-independent·, and ·focus-independent·.
fn:format-time
This function is ·deterministic·, ·context-dependent·, and ·focus-independent·. It depends on default calendar, and default language, and default place, and implicit timezone.
fn:index-of
The two-argument form of this function is ·deterministic·, ·context-dependent·, and ·focus-independent·. It depends on collations, and implicit timezone.
The three-argument form of this function is ·deterministic·, ·context-dependent·, and ·focus-independent·. It depends on collations, and static base URI, and implicit timezone.
fn:element-number
The zero-argument form of this function is ·deterministic·, ·context-dependent·, and ·focus-dependent·.
The one-argument form of this function is ·deterministic·, ·context-independent·, and ·focus-independent·.
The two-argument form of this function is ·deterministic·, ·context-independent·, and ·focus-independent·.
The three-argument form of this function is ·deterministic·, ·context-independent·, and ·focus-independent·.
I am afraid I cannot give hints for improvement yet; I just noticed it is increasingly difficult to interpret. For the moment, I wonder…
Are all of these current definitions correct?
In many cases, if the user supplies an empty sequence as argument, the default value is used instead. This contrasts with the current property description that relies a lot on the function arities. For example, fn:index($a, $b) and fn:index-of($a, $b, ()) should have identical properties, but the current wording implies that the three-argument of this function has different properties, e.g., it is said to rely in this case on the static base URI.
Some functions with default values have a single property description (see fn:format-integer), other have multiple descriptions (see fn:format-time). Is there a particular rule behind that?
Could we merge the descriptions for arities with identical properties?
Maybe it will be easier not to consider the arities at all anymore?
The text was updated successfully, but these errors were encountered:
I was looking at those sections recently as well. I think it would be nice if we had explicit markup for the properties, so that I could easily and reliably build a table of all the functions and their properites, for example. But I became discouraged by the variety (the two argument form..., the three argument form...) and the comments about dependencies (calendar, time zone, etc.)
An observation is that there is no function that is deterministic for some arities and nondeterministic for others, so we could perhaps factor that out.
We could also (at merge-function-specs line 128) look for cases where several different arities have the same property values, and factor that out: "With two or more arguments, the function is context-independent and focus-independent". Or rather than doing it in the stylesheet, we could extend fos:property/@arity to allow values like "2-5" or "2+".
We could also combine the "focus-dependent" and "context-dependent" properties, replacing <fos:property>focus-dependent</fos:property> with <fos:property dependency="focus">context-dependent</fos:property>.
In many cases, if the user supplies an empty sequence as argument, the default value is used instead
This highlights that it is becoming misleading to speak of "the one-argument form of this function". It might be better to say (taking format-integer as an example): "If $language is absent or empty, the function is context-dependent (it depends on default language). In other cases the function is context-independent". This represents a change of the implied data model, so that the context-dependency of a function depends not so much on the arity, as on the presence or absence of specific parameters.
I try to understand the semantics behind the Properties section in the XQFO spec. Here are some examples of existing functions:
fn:format-integer
fn:format-time
fn:index-of
fn:element-number
I am afraid I cannot give hints for improvement yet; I just noticed it is increasingly difficult to interpret. For the moment, I wonder…
fn:index($a, $b)
andfn:index-of($a, $b, ())
should have identical properties, but the current wording implies that the three-argument of this function has different properties, e.g., it is said to rely in this case on the static base URI.fn:format-integer
), other have multiple descriptions (seefn:format-time
). Is there a particular rule behind that?The text was updated successfully, but these errors were encountered: