Skip to content

Commit

Permalink
updates xpath validator
Browse files Browse the repository at this point in the history
  • Loading branch information
Kolea PLESCO authored and Kolea PLESCO committed Apr 9, 2024
1 parent b0f5ff7 commit 1d49e15
Showing 1 changed file with 28 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@
{% if template_metadata.grouping %}
<li><b>Grouping:</b> {{ template_metadata.grouping }}</li>
{% endif %}
<li>
<div><hr></div>
<h4>Overall coverage</h4>
<h3>{{ "%.2f"|format((validation_result.coverage|float * 100)) }}%</h3>
<p>(Number of Conceptual XPATHs found in notices) / (Total number of unique XPATHs in provided notices)</p>
<li><div><hr></div>
<h4>Conceptual coverage</h4>
<h3>{{ "%.2f"|format((validation_result.conceptual_coverage|float * 100)) }}%</h3>
<p>(Number of Conceptual XPATHs found in notices) / (Total number of unique Conceptual XPATHs)</p>
</li>
{% set nr_notices = notices|length %}
<li><div><hr></div>
{% if nr_notices > 1 %}
Expand Down Expand Up @@ -140,7 +150,24 @@
</tbody>
</table>
{% endif %}

{% if validation_result.xpath_covered|length > 0 %}
<hr>
<h2>XPATHs covered in the "Rules" of Conceptual Mapping</h2>
<table class="display summary" data-order='[[0, "asc"]]'>
<thead>
<tr>
<th>XPATH</th>
</tr>
</thead>
<tbody>
{% for xpath in validation_result.xpath_covered %}
<tr>
<td class="break-word">{{ xpath }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
<hr>
</body>
</html>
Expand Down

0 comments on commit 1d49e15

Please sign in to comment.