so we're looking at an accumulator on a temporary tree that was copied from the accumulator values on the principal source document. The spec says (in §18.2.2 #5)
For a document containing nodes supplied in the initial match selection, the accumulators that are applicable are those determined by the xsl:mode declaration of the initial mode. This means that in the absence of an xsl:mode declaration, no accumulators are applicable.
and rule 6 says:
For a tree T created by copying a node in a tree S using the copy-of or snapshot functions, or the instruction xsl:copy-of with copy-accumulators="yes", an accumulator is applicable to T if and only if it is applicable to S.
Taking these rules together, the accumulator is not applicable to the initial match selection, therefore it is not applicable to $v, therefore the test should fail with XTDE3362.
I proposed to fork the test, creating one variant with the stylesheet unchanged, expecting an error, and another variant that corrects the error by making the accumulator applicable.
I think copy-3002 should fail because the accumulator is not applicable.
We're doing this:
so we're looking at an accumulator on a temporary tree that was copied from the accumulator values on the principal source document. The spec says (in §18.2.2 #5)
For a document containing nodes supplied in the initial match selection, the accumulators that are applicable are those determined by the
xsl:mode
declaration of the initial mode. This means that in the absence of anxsl:mode
declaration, no accumulators are applicable.and rule 6 says:
For a tree T created by copying a node in a tree S using the
copy-of
orsnapshot
functions, or the instructionxsl:copy-of
withcopy-accumulators="yes"
, an accumulator is applicable to T if and only if it is applicable to S.Taking these rules together, the accumulator is not applicable to the initial match selection, therefore it is not applicable to $v, therefore the test should fail with XTDE3362.
I proposed to fork the test, creating one variant with the stylesheet unchanged, expecting an error, and another variant that corrects the error by making the accumulator applicable.