W3C home > Mailing lists > Public > public-qt-comments@w3.org > February 2015

[Bug 27807] [xslt 3.0] Streaming of "document fragments"

From: <bugzilla@jessica.w3.org>
Date: Fri, 06 Feb 2015 18:20:02 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-27807-523-IGDfO2M4z7@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27807

Michael Kay <mike@saxonica.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #3 from Michael Kay <mike@saxonica.com> ---
After further discussion, the WG accepted a "sketch proposal" to resolve this
along the following lines: the expression "$X instance of ST" should not be
motionless in the case where the item type of ST takes the form
document-node(element(X)). The editor was asked to flesh this out into a
detailed proposal. Here is the proposal.

A. In 19.8.7, in the table row for InstanceOfExpr [25], replace the proforma by
a reference to a new section entitled "Streamability of Instance-Of
expressions".

B. Add a new section "Streamability of InstanceOf expressions" with the
following content:

For an expression of the form X instance of ST (where X is an expression and ST
is a SequenceType), the posture and sweep are determined by the general
streamability rules. There is a single operand X, whose operand usage is as
follows:

(1) If the ItemType of ST is a DocumentTest, optionally parenthesized, then
absorption

(2) Otherwise, inspection.

Note: In general, is is possible to determine whether a node matches an
ItemType without consuming the node.

An ItemType of the form document-node(element(X)) is a exception to this rule
because it matches a document node only if it has exactly one element node
child, and this cannot be determined without consuming the document.

A processor may have knowledge that the document node cannot contain multiple
element nodes, for example because it knows that the source of the streamed
document is an XML parser that is not capable of generating such a stream. In
such cases the processor may make a different assessment of the streamability
of this construct. This comes under the general provision that a processor is
always at liberty to use streaming even when the stylesheet is not guaranteed
streamable.

Note: As with other constructs that are evaluated with inspection usage, for
example the name() function or access to an attribute node, evaluation of a
construct such as ($X instance of schema-element(E)) as true or false may be
invalidated if reading of the input stream subsequently fails. Dynamic errors
during streamed processing of an input document invalidate all output generated
prior to the failure, and this case is no different.

Note: Given an expression such as (child::* instance of element(E)*), the
expression as a whole is consuming and grounded. By contrast, the expression (.
instance of element(E)*) is motionless and grounded. This can be verified by
applying the general streamability rules to these cases.

[ED NOTE: a brave assertion, which I need to check...]

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Friday, 6 February 2015 18:20:04 UTC

This archive was generated by hypermail 2.3.1 : Friday, 6 February 2015 18:20:04 UTC