Message
(
alt-text
, long-desc
) should not repeat the label
(
alt-text
, long-desc
) should not repeat the label
This rule REPORTS an alert when the following is TRUE:
let $ntext := local:normalize-text(.) return some $label in preceding-sibling::label
satisfies ( let $nlabel := local:normalize-text($label) return ( contains($ntext,
$nlabel) and not( contains($ntext, $nlabel || ' shows ') or contains($ntext, $nlabel
|| ' presents ') or contains($ntext, ' zoom in on ' || $nlabel)
or ( (: check if label is a number that is a word by itself in the text :) matches($nlabel,
'^\d+$') and empty(tokenize($ntext, '\s+')[. = $nlabel]) )
)))