Re: Static streamability, regarding bug 29984

> 
> That is exactly what the discussion is about. Without such an error
> it is extremely difficult to write a stylesheet that is guaranteed to
> be streamable in all implementations.
>   

I do understand why you want this feature.

I'm just telling you, for information, that while the streamability rules in my product are very close to the W3C rules, they are not identical, and making them identical will involve a great deal of work. It will involve, for example:

*  writing a second parallel type inference engine that implements the static typing rules in 19.1 of the specification, rather than using the more precise type computed by the current Saxon inference engine. 

*  maintaining distinctions in the expression tree between constructs that are currently treated identically because they have identical semantics, for example betwee the xsl:copy-of instruction and the copy-of function, or between xsl:for-each and the "!" operator (and then implementing arbitrarily different streamability rules for the different cases)

It's possible to reduce the gap between the Saxon rules and the W3C rules incrementally (for example, one significant step would be a switch to disable all schema-related type inferencing) but that only narrows the gap, it does not eliminate it.

The result of all this work will be to eliminate a very small number of edge cases where a construct is currently streamable in Saxon but not guaranteed streamable according to W3C rules. The number of affected constructs will be so small that even identifying and writing test cases for them will be a significantly difficult exercise. New edge cases are likely to be discovered over a period of many years. Most of the edge cases affected will be in unrealistic code, for example code where the Saxon type inference engine can infer that a construct is statically void (will always return an empty sequence) but where the ยง19.1 rules are unable to make this inference - in most cases where this happens it is because the stylesheet author has written a path expression that can never select anything, and I don't think we should be too concerned about the streamability of incorrect code.

If you want to delay the spec until this requirement has been 100% implemented then you may have to wait a considerable time.

Michael Kay
Saxonica

Received on Thursday, 8 December 2016 00:03:42 UTC