protected function getFormattedElementAttributes()
    {
        $strOptions = '';
        $this->generateStyleAttribute();

        foreach ($this->arrAttributes as $strKey => $strVal)
            if ($strVal !== '')
                $strOptions .= sprintf(
                    ' %s="%s"',
                    htmlspecialchars($strKey, ENT_QUOTES | ENT_XHTML),
                                     htmlspecialchars($strVal,
                                                      ENT_QUOTES | ENT_XHTML)
                );

        return $strOptions;
    }