-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal to support optional parameters that bind to the context item. #157
Comments
Depends on #155. |
This reads more like a requirement than a specification. What exactly is allowed and what isn't? A lot more detail is needed. The default for
` element? (Note, XSLT named templates can define default values in this way, and these edge-case issues only came to light after many years. For XSLT, of course, we would want the rules for functions to be as close as possible to the rules for named templates.) |
I wanted to capture this separately as IIUC, supporting This is part of simplifying the problem domain so that when it comes to standardizing this we have an easier task of reviewing and accepting the proposals. This is not yet a full specification -- I just wanted to capture the problem domain/requirement initially as a starting point for the discussions and outlines for a complete specification with all the details and nuances. |
The pull request for issue #155 provides this feature. |
I believe this can now be closed as completed. |
This proposal formalizes the definition of the 0-arity versions of
fn:string
,fn:data
, etc. that bind to the context item.Motivation
This allows
fn:string
to be defined and implemented in a single function of the form:Notes
When the default value is specified, the function is ·context-independent·, and ·focus-independent· at this point.
When the default value is not specified, the function is ·context-dependent·, and ·focus-dependent· at this point.
This allows users to define their own functions that can be used at the end of path expressions, e.g.
/color/hexcode/to-int(16)
.Once this proposal has been accepted, we should go through the XSLT and XQFO specifications and use defaults for all the relevant functions.
The text was updated successfully, but these errors were encountered: