W3C home > Mailing lists > Public > public-qt-comments@w3.org > October 2016

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

From: <bugzilla@jessica.w3.org>
Date: Thu, 13 Oct 2016 15:23:00 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29887-523-oPN4ix8Afu@http.www.w3.org/Bugs/Public/>

--- 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(@select) ==> exists(@select|@_select)

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

$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)) =

==> count((@group-by|@_group-by, @group-adjacent|@_group-adjcent,
@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

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
            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

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

This archive was generated by hypermail 2.3.1 : Thursday, 13 October 2016 15:23:11 UTC