39 public function validate($id, $config, $context)
41 if (!$this->selector && !$config->get(
'Attr.EnableID')) {
51 $prefix = $config->get(
'Attr.IDPrefix');
53 $prefix .= $config->get(
'Attr.IDPrefixLocal');
55 if (strpos($id, $prefix) !== 0) {
58 } elseif ($config->get(
'Attr.IDPrefixLocal') !==
'') {
60 '%Attr.IDPrefixLocal cannot be used unless ' .
61 '%Attr.IDPrefix is set',
66 if (!$this->selector) {
67 $id_accumulator =& $context->get(
'IDAccumulator');
68 if (isset($id_accumulator->ids[$id])) {
75 if (ctype_alpha($id)) {
78 if (!ctype_alpha(@$id[0])) {
89 $regexp = $config->get(
'Attr.IDBlacklistRegexp');
90 if ($regexp && preg_match($regexp, $id)) {
94 if (!$this->selector &&
$result) {
95 $id_accumulator->add($id);