-
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
701: fn:concat: Support for 0 or more arguments #702
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a bit more precision, I'd suggest defining it as:
This function accepts zero or more arguments, each declared with the required type xs:anyAtomicType*
. The value supplied for each argument is reduced to a single string by applying the fn:string-join#1 function; the resulting sequence of strings (one for each supplied argument) is then reduced to a single string by a further application of fn:string-join#1.
Hmmm... I think that accepting sequences breaks 1.0 compatibility mode. In XPath 1.0, We could make the actual semantics of the function dependent on whether compatibility mode is set in the static context. I don't think we have a precedent for that, but I can't see any harm in it. |
I wonder if it would make a difference to invoke string-join just once for all strings, or repeatedly for the strings of each argument?
Would be fine by me. I might be overwhelmed finding the right wording, though. Would you be ready to revise the PR? |
It wouldn't make a difference, it would just be a little bit more difficult to define (I think). |
For 1.0 compatibility, try: This function accepts zero or more arguments, each declared with the required type
The resulting sequence of strings (one for each supplied argument) is then reduced to a single string by applying the function fn:string-join#1 to the sequence. |
Revised as suggested, thanks. |
The CG agreed to accept this PR at meeting 046. |
Closes #701