Skip to content

Commit 1d49e15

Browse files
Kolea PLESCOKolea PLESCO
authored andcommitted
updates xpath validator
1 parent b0f5ff7 commit 1d49e15

1 file changed

Lines changed: 28 additions & 1 deletion

File tree

ted_sws/notice_validator/resources/templates/xpath_coverage_report.jinja2

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,16 @@
8888
{% if template_metadata.grouping %}
8989
<li><b>Grouping:</b> {{ template_metadata.grouping }}</li>
9090
{% endif %}
91+
<li>
92+
<div><hr></div>
93+
<h4>Overall coverage</h4>
94+
<h3>{{ "%.2f"|format((validation_result.coverage|float * 100)) }}%</h3>
95+
<p>(Number of Conceptual XPATHs found in notices) / (Total number of unique XPATHs in provided notices)</p>
96+
<li><div><hr></div>
97+
<h4>Conceptual coverage</h4>
98+
<h3>{{ "%.2f"|format((validation_result.conceptual_coverage|float * 100)) }}%</h3>
99+
<p>(Number of Conceptual XPATHs found in notices) / (Total number of unique Conceptual XPATHs)</p>
100+
</li>
91101
{% set nr_notices = notices|length %}
92102
<li><div><hr></div>
93103
{% if nr_notices > 1 %}
@@ -140,7 +150,24 @@
140150
</tbody>
141151
</table>
142152
{% endif %}
143-
153+
{% if validation_result.xpath_covered|length > 0 %}
154+
<hr>
155+
<h2>XPATHs covered in the "Rules" of Conceptual Mapping</h2>
156+
<table class="display summary" data-order='[[0, "asc"]]'>
157+
<thead>
158+
<tr>
159+
<th>XPATH</th>
160+
</tr>
161+
</thead>
162+
<tbody>
163+
{% for xpath in validation_result.xpath_covered %}
164+
<tr>
165+
<td class="break-word">{{ xpath }}</td>
166+
</tr>
167+
{% endfor %}
168+
</tbody>
169+
</table>
170+
{% endif %}
144171
<hr>
145172
</body>
146173
</html>

0 commit comments

Comments
 (0)