This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6531 - [FOerrata] fn:concat and '...' not defined
Summary: [FOerrata] fn:concat and '...' not defined
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Functions and Operators 1.0 (show other bugs)
Version: Recommendation
Hardware: All All
: P3 minor
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
Depends on:
Reported: 2009-02-04 17:13 UTC by Ben Wagner
Modified: 2009-10-16 21:45 UTC (History)
0 users

See Also:


Description Ben Wagner 2009-02-04 17:13:47 UTC
This is somewhat nit-picky but fn:concat is specified as

fn:concat($arg1 as xs:anyAtomicType?,
$arg2 as xs:anyAtomicType?,
... ) as xs:string

but the meaning and usage of '...' is never defined. This should be defined in section 1.4. Also, the base type of these optional arguments should be stated explicitly, like

fn:concat($arg1 as xs:anyAtomicType?,
$arg2 as xs:anyAtomicType?,
... as xs:anyAtomicType?) as xs:string

instead of implicitly by stating this only in the text following. I realize that fn:concat is the only vararg function and is rather special cased, but I believe that making such changes would make the meaning far more explicit.

So the proposal is to add to section 1.4 wording to the effect of "The last parameter declaration of a function signature may specify '...' instead of a $parameter-name. This indicates that there may be a variable number of arguments passed to the function. The type of these arguments must match the type specified by the parameter-type of the parameter declaration." and change the fn:concat signature as described above.
Comment 1 Michael Kay 2009-05-26 14:34:53 UTC
This is classed as editorial, so I am proposing to fix it using editorial discretion.

I've added text for the next version of Functions and Operators that mentions the use of this special-case notation for concat:

"One function, <code>fn:concat</code>, has a variable number of arguments (two or more). More strictly, there is an infinite set of functions having the name <code>fn:concat</code>, with arity ranging from 2 to infinity. For this special case, a single function signature is given, with an ellipsis indicating an indefinite number of arguments."

I don't think there's a need to formalize it any further than this. The meaning is clear.

If you can accept this resolution, I would be grateful if you would mark it as closed.
Comment 2 Michael Kay 2009-10-16 21:45:59 UTC
As there has been no response to my request to close this or comment on the resolution, I am marking it closed with no further action.