In class today (2020-02-26), one of you observed that when you check for duplicate stooges with something like:
<sch:rule context="results">
<xsl:assert test="count(stooge/@name) = count(distinct-values(stooge/@name))">There
are duplicate stooges</xsl:assert>
</sch:rule>
any error is reported on the <results> element, and you have to hunt down the duplicate values on your own. With only three stooges that isn’t a problem, but if you have to find the duplicates in a very large number of values, you would want the error to be reported on the duplicate stooges, and not globally on <results>.
In class today (2020-02-26), one of you observed that when you check for duplicate stooges with something like:
any error is reported on the
<results>
element, and you have to hunt down the duplicate values on your own. With only three stooges that isn’t a problem, but if you have to find the duplicates in a very large number of values, you would want the error to be reported on the duplicate stooges, and not globally on<results>
.So: how would you do that?