public function getAttributesString ()
    {
        $attributePairs = array();
        foreach ($this->getAttributes() as $attr => $value)
            $attributePairs[] = sprintf('%s="%s"', $attr, str_replace('"', '&quot;', $value));
        return implode(' ', $attributePairs);
    }