4 * Validates that this ID does not exist already in the interchange object.
6 * Although this tests both possible values, in practice the ID
7 * will only be in one or the other. We do this to keep things simple.
9 class HTMLPurifier_ConfigSchema_Validator_Duplicate
extends HTMLPurifier_ConfigSchema_Validator
12 public function validate(&$arr, $interchange) {
13 if (isset($interchange->namespaces
[$arr['ID']])) {
14 $this->error('Cannot redefine namespace');
16 if (isset($interchange->directives
[$arr['ID']])) {
17 $this->error('Cannot redefine directive');