public function addAttribute($name, $value)
    {
        if ($name == 'Pattern') {
            $value = $this->sanitizePattern($name, $value);
        }
        $this->attributes[$name] = $value;

        return $this;
    }