- From: <bugzilla@jessica.w3.org>
- Date: Fri, 05 Sep 2014 14:11:31 +0000
- To: public-qt-comments@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26737 Bug ID: 26737 Summary: [xslt3.0] Editorial: accumulators Product: XPath / XQuery / XSLT Version: Working 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 NOTE: the attribute xsl:accumulator-rule/@phase is optional, but I don't think we define a default. I think phase="start" was intended (and is assumed in some of our examples). NOTE: the schema for XSLT 3.0 incorrectly permits xsl:accumulator/@post-descent NOTE: the example in 18.2.4 appears to be incorrect. accumulator-before() returns the pre-descent value of the accumulator, which is the value AFTER the initial node visit. So to get the sequence 1,2,3, ... the initial value should be zero. This also applies to the example in 18.2.5. NOTE: the first example in 18.2.8 is not streamable, as it claims. It doesn't have the attribute streamable="yes", and the select attribute on the accumulator rule is not motionless. NOTE: the last example in 18.2.8 has syntax problems. The first map:put() has unmatched parens; the second has a colon that should be a comma. There also seems to be a semantic problem: the accumulator is calling itself. I think the body of the rule should be: if (map:contains($value, @publisher)) then map:put($value, @publisher, $value('publisher')+1 ) else map:put($value, @publisher, 1)"/> NOTE: we don't have any examples of accumulators calling each other. I think Abel had a use case? NOTE: for childless nodes, it appears that accumulator-before() and accumulator-after() return the same value: the value after applying the phase=start rules will always be the same as the value before applying the phase=end rules. NOTE: the names accumulator-before() and accumulator-after() are certainly confusing. Consider the example in 18.2.8, where the meaning of the function call accumulator-before('firstTitle') is to return the value of the first title element. NOTE: we might add a note that having a phase="end" rule that matches the document node is useless, because there is no way of getting the final value. Calling accumulator-after returns the value BEFORE applying the phase="end" rules. -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Friday, 5 September 2014 14:11:32 UTC