-
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
array:members-at #825
Comments
The reason for the omission is that arrays do not contains items, they contain members, which are sequences. Filtering is therefore a more complex operation. |
I agree though that |
@dnovatchev I assume you would expect the signature to be… fn:members-at(
$array as array(*),
$at as xs:integer*
) as array(*) …and Related: #135 |
@ChristianGruen I had significant difficulties understanding what this expression was intended to mean. Why should one spend 30 minutes to decipher what such expression may mean, when they could use a very understandable fn:members-at ? |
Absolutely agree! I will edit the title and the issue. Done! |
No need to. Once again, this seems to be a misunderstanding. I just wanted to understand what exactly your function is expected to do, as it needs to be implemented at some stage. Feel free to add a better explanation. |
A proposal for array:members-at will essentially be similar to the one for Writing such a proposal can be done rather mechanically. I added a complete XPath 3.1 implementation. |
As we already have |
The CG decided to close this issue without further action at meeting 067. |
The title says it all.
We have fn:slice and array:slice. We also do have fn:items-at, but we have somehow missed to add the corresponding
array:items-atarray:members-at function.We could even think of a function map:entries-at and map:values-for-keys. The first of these would return all map entries that have as keys one of the provided as argument set of keys. The 2nd function would return all values of the map entries that have as keys one of the provided as argument set of keys.
Here is a complete XPath 3.1 implementation:
Example:
Evaluating this expression:
produces the wanted result:
[1], [(4,5,6)]
The text was updated successfully, but these errors were encountered: