protected function validateEnum ($name, $v)
  {
    $enum = $this->getEnumOf ($name);
    if (is_null ($v) && !$this->isRequired($name))
      return;
    if (array_search ($v, $enum) === false) {
      $list = implode ('</b>, <b>', $enum);
      throw new ComponentException ($this->component,
        "Invalid value for attribute/parameter <b>$name</b>.\nExpected: <b>$list</b>.");
    }
  }