This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Under 19.8.1 General Rules for Streamability (http://www.w3.org/TR/xslt-30/#general-streamability-rules), item 2.d.iii, we say the following: "If the posture of o is crawling and C is a function call of a function whose signature indicates a return type with a maximum cardinality of one (for example a call on head or exactly-one), then striding and the adjusted sweep of o." This rule can only be applicable to built-in functions, or potentially extension functions of which the processor knows how they can be applied. For stylesheet functions, passing a node to a function without atomizing it is not allowed. I think it is best if we simply list the group of "functions with cardinality one" to avoid confusion.
function of maximum cardinality of one are function for which each call to ($x1, $x2, ...$xn) satisfies zero-or-one(f($x1, $x2, ...,$xn))
I think the rules do work as written, though the reason why is quite subtle. If a call to a user-defined function allows nodes, then the argument that allows nodes will have a type-determined usage of navigation; under 1(b)(iii)(B) in the GSR it will therefore have an adjusted sweep of free-ranging. Rule 2(b) therefore applies and takes precedence over 2(d)(iii). I would not be averse to a note in 2(d)(iii) that points this out.
We probably need to apply this rule to both a function call and a dynamic function call, or does "function call" already entails dynamic function calls? Not sure about production rules here.
We discussed this in Prague. The functions with arguments of usage = transmission that fall under the rule in 2(d)(iii) are: exactly-one(), head(), zero-or-one(). (Others are transmissional but have cardinality gt 1.) There was resistance to listing these in normative prose, but a note saying something like "at the time this spec was first published, the functions in question were: ..." would be OK. It might also be helpful to be more explicit about invariants known to be true when 2(d)(iii) applies: - We know we're talking about a built-in or extension function, and not a stylesheet function (stylesheet function arguments have type determined usage and don't reach this point). - We know that the operand usage is transmission. - We know it's not a dynamic function call but a static one.
I have added a note explaining that these are the only three functions to which this rule applies (at present), and explaining why.