- From: <bugzilla@jessica.w3.org>
- Date: Tue, 15 Jul 2014 01:18:18 +0000
- To: public-qt-comments@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=25316 Abel Braaksma <abel.braaksma@xs4all.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |abel.braaksma@xs4all.nl --- Comment #4 from Abel Braaksma <abel.braaksma@xs4all.nl> --- Some observations: 1) I think this new rule, and the existing rule, has an error. We say "If B is crawling ....<set of rules>... then crawling and consuming". As written, this rule has no effect. Because the result is a single node, the resulting posture should be striding. 2) "... and consuming". I can't think of a crawling expression that is motionless, it could happen in xsl:for-each, but there a crawling expression cannot be the focus setting expression. 3) We do allow position() in a predicate, except that than the result of B[position()] is crawling (this follows from the next rule in that section). 4) "that has F as its focus-setting container" >> I think you mean "that has B as its focus-setting container. F already includes P, so I don't think the whole expression can be its own focus-setting container. 5) "other than last();" >> the last() function is already prohibited in a filter expression, unless in a nested filter expression with climbing posture, but these rules rule other path expressions out. It appears to me that the rules are meant to allow such expressions as: (foo//bar)[12 + $count] (foo//bar)[(1, 2, 3)[last()]] (foo//bar)[(3, 4, 5)[position() = $pos]] (foo//bar)[count($param)] And to disallow (in fact, leave result as crawling): (foo//bar)[position()] (foo//bar)[@graph = 10] (foo//bar)[position() = 12] (foo//bar)[number(parent::*[2]/@age) + 10] Handy: the new (and existing) rules can turn a crawling expr into striding, if you expect zero-or-one results: (foo//bar)[@graph = 10][1] (foo//bar)[number(parent::*[2]/@age) + 10][1] (foo//bar)[position()][ancestor::name[@age]][1] 6) We have a rule under 19.8.7.7 (axis steps) that is almost the same: "4. If the context posture is striding, and the axis is descendant or descendant-or-self, and there is a predicate in the PredicateList that is either a numeric literal or a variable reference whose static type is a subtype of U{xs:decimal, xs:double, xs:float} (for example, descendant::title[1]), then striding and consuming;" Should we apply these new rules there as well (or reference it to have them in one place)? -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Tuesday, 15 July 2014 01:18:19 UTC