[Bug 29887] [XSLT30] Assertion on attributes of xsl:for-each-group is too strict, does not take shadow attribs into account

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29887

--- Comment #1 from Michael Kay <mike@saxonica.com> ---
There are a few other cases of the same problem.

Line 180
<xs:assert test="not(exists(@select) and (exists(* except xsl:fallback) or
exists(text()[normalize-space()])))"/>

exists(@select) ==> exists(@select|@_select)

Line 327, 690, 728, 1374
<xs:assert test="every $e in subsequence(xsl:sort, 2) satisfies
empty($e/@stable)">

$e/@stable ==> $e/(@stable|@_stable)

Line 371, 503, 530, 552, 615
<xs:assert test="not(exists(@type) and exists(@validation))">

==> not(exists(@type|@_type) and exists(@validation|@_validation))

Line 737

count((@group-by, @group-adjacent, @group-starting-with, @group-ending-with)) =
1

==> count((@group-by|@_group-by, @group-adjacent|@_group-adjcent,
@group-starting-with|@_group-starting-with,
@group-ending-with|@_group-ending-with)) = 1

(could use the comma operator throughout but it feels more expressive this way)

Line 746

if (exists(@collation) or exists(@composite)) then (exists(@group-by) or
exists(@group-adjacent)) else true()"

==> as elsewhere, replace @X by @X|@_X

Line 807, 814, 821, 890, 

Line 1085
test="not(exists(@name) and normalize-space(@visibility) = 'private' and
exists(xsl:context-item))"

this one is more tricky because it's looking at attribute values. But the rule
is obsolete because xsl:mode no longer has an xsl:context-item child. Slightly
surprised Saxon's static type checking lets that through.

line 1182
<xs:assert test="every $prefix in (@stylesheet-prefix, @result-prefix)[. ne
'#default']
            satisfies $prefix = in-scope-prefixes(.)"/>

we can keep this as is.

line 1186
test="if (exists(@value)) then empty((@select, @count, @from)) and
@level='single' else true()">

Usual @X by @X|@_X except that @level='single' becomes (@level='single' or
@_level)

line 1134
<xs:assert test="if (normalize-space(@static) = 'yes')
                           then empty((*,text()))
                           else true()">
Leave as is.

etc. etc. All the remaining assertions fit into one of the above patterns.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 13 October 2016 15:23:10 UTC