Closed birdya22 closed 1 month ago
Using getLocation
(#1971) in Saxon 12.4 caused an <xsl:sequence select="@nonexistent-attribute" />
element to have a correct hit in the trace data, though other xsl:sequence
elements with a select
attribute do not have a hit in their trace data. Maybe we should use a kind of hybrid rule like this:
That way, the report won't mark an element as 'unknown' when the trace data has a hit.
Yes.
The trace isn't related to the xsl:sequence
element but to the xsl:on-non-empty
element I think, which would explain why other xsl:sequence
elements aren't hit. . The trace has a class of net.sf.saxon.expr.instruct.ConditionalBlock
Changes in
test/end-to-end/cases-coverage/expected
In the section above about changes in expected reports, I believe you wrote 'ignored' where you meant 'unknown'. The section of this issue description about XSLT changes says 'unknown', which also aligns with how we've been discussing 'unknown' as a status to use when trace data isn't sufficient.
Current Non-Conformance
The
xslt-code-coverage-behavior-by-element.md
file says thatxsl:sequence
elements should be marked based on their child elements. Thecoverage-report.xsl
in 3.0.3 marks them as 'missed' because there is no hit element in the XSpec trace file and there is no rule in coverage-report.xsl to process them.Changes in
coverage-report.xsl
A rule needs to be added to
coverage-report.xsl
as follows for xsl:sequence: If node has no children, mark it as 'unknown'. If the trace data has a "hit" element for a child of this node, then mark this node as a 'hit'. Otherwise, mark it as 'missed'.Changes in
test/end-to-end/cases-coverage/expected
In the coverage report
xsl-sequence-01-coverage.html
the firstxsl:sequence
element will be marked as 'ignored' rather than 'missed'. The secondxsl:sequence
element will be marked as 'hit' rather than 'missed'.In the coverage report
xsl-analyze-string-01-coverage.html
the 1xsl:sequence
element will be marked as 'ignored' rather than 'missed'. In the coverage reportxsl-on-non-empty-01-coverage.html
the 1xsl:sequence
element will be marked as 'ignored' rather than 'missed'.The change will also have an effect on the
xsl:sequence
elements in thexsl-map-01-coverage.html
coverage report. Once a decision has been made on the rules forxsl:map
andxsl:map-entry
this issue will be updated with details of any changes to thexsl:sequence
elements.