public function buildAttribute($property)
    {
        $attribute = '';
        if (isset($this->$property)) {
            $attribute .= ' ' . $property . '="';
            if (is_bool($this->$property)) {
                $attribute .= ($this->$property) ? 'true' : 'false';
            } else {
                $attribute .= SolrRequest::escapeXml($this->$property);
            }
            $attribute .= '"';
        }
        return $attribute;
    }