- From: <bugzilla@jessica.w3.org>
- Date: Thu, 22 Oct 2015 15:44:01 +0000
- To: public-qt-comments@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29229 Bug ID: 29229 Summary: [xslt30] Streamability of XPath 3.1 constructs Product: XPath / XQuery / XSLT Version: Last Call drafts Hardware: PC OS: All Status: NEW Severity: normal Priority: P2 Component: XSLT 3.0 Assignee: mike@saxonica.com Reporter: mike@saxonica.com QA Contact: public-qt-comments@w3.org Target Milestone: --- We need to add streamability rules XPath 3.1 constructs. A first cut at these rules appears in https://lists.w3.org/Archives/Public/public-xsl-wg/2015Sep/0006.html and the editor was actioned to refine the proposal. Here is the refinement. Add to section 4.7 (Data Model for Streaming) Two new data structures have been added to the data model: maps and arrays. Both are defined in XPath 3.1, but maps are also available in XSLT processors that only support XPath 3.0. Streaming facilities in this specification are, for the most part, relevant only to streamed processing of XML trees, and not to other structures such as sequences, maps and arrays, which will typically be held in memory unless the processor is capable of avoiding this. The rules for creating maps and arrays are designed to ensure that the entries in a map, and the members of an array, cannot contain nodes from a streamed document. This is achieved by the way in which the streamability properties of the relevant expressions and functions are defined. By contrast, sequences can and often do contain nodes from streamed documents, and a major purpose of the rules for streamability is to make this possible. 19.2 Determining the Static Type In the list introduced by “The mapping is as follows”, change “ • FunctionTest and MapTest map to U{function(*)} to • FunctionTest, MapTest and ArrayTest map to U{function(*)} We have already added new XPath 3.1 constructs as an additional table towards the end of the section, but this needs slight amendment because the Arrow expression is now a first-class expression in its own right rather than a type of PostfixExpr. Furthermore, lookup expressions are now supported in XSLT 3.0 whether or not the XPath 3.1 feature is enabled, so these should move into the main table. 19.8.8 Classifying Expressions The table of expressions needs the same additions as in 19.2: Unary lookup, Postfix lookup, arrow expressions, square and curly array constructors. For square and curly array constructors, the GSR applies with operand usage navigation for all the operands, which can be expressed using the proformas [N, N, …] and {N, N, …}. For an arrow expression X => F(X, Y) the streamability is the same as that of the equivalent static or dynamic function call F(X, Y, Z). For a postfix lookup, the GSR applies. Given E?L, E has usage inspection (by analogy with dynamic function calls), and L is a higher-order operand with usage absorption. Where L is a wildcard (E?*), there is only one operand E, with usage inspection. For a unary lookup, ?L has the same streamability as the postfix lookup expression .?L. 19.8.9 Classifying calls to built-in functions New 3.1 functions need to be added to the list. They are all be straightforwardly definable using the “proforma” technique. The list here is generated from the function catalog used when generating the XPath 3.0, XPath 3.1, and XSLT 3.0 specifications. The XPath 3.0 and XSLT 3.0 catalogs have been annotated with operand usages. The XP30 usages need to be transferred to the XP31 spec, and usages added for functions that are new in XP31. For the array functions, the appropriate proformas are: array:size(A) array:get(A, A) array:append(A, N) array:subarray(A, A, A) array:remove(A, A) array:insert-before(A, A, N) array:head(A) array:tail(A) array:reverse(A) array:join(A) array:for-each(N, I) (map:for-each should also be (N, I)) array:filter(N, I) array:fold-left(N, A, I) array:fold-right(N, A, I) array:for-each-pair(N, N, I) array:sort(N, I) array:flatten(A) The other new functions in 3.1 are: parse-ietf-date(A) parse-json(A) json-doc(A) sort(N, I) load-xquery-module(A, A) transform(A, A) contains-token(A, A) random-number-generator(A) tokenize(A) trace(A) -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Thursday, 22 October 2015 15:44:07 UTC