'Delete a record.
:param record: Record to delete.
:type  record: :class:`Record`
:rtype: ``bool``'

def delete_record(self, record):

    schema_params = SCHEMA_BUILDER_MAP.get('delete_record')
    attributes = schema_params.get('attributes')
    schema = api_schema_builder(schema_params.get('urn_nid'), schema_params.get('method'), attributes)
    params = {'apiuser': self.key, 'apikey': self.secret, 'zonename': record.zone.id, 'id': record.id}
    urn = schema.getchildren()[0]
    for child in urn:
        key = child.tag.split(':')[2]
        if (key in attributes):
            child.text = str(params.get(key))
    req_data = tostring(schema)
    action = '/services/dns/deleteRecord.php?'
    headers = {'SOAPAction': 'urn:deleteRecordwsdl#deleteRecord'}
    try:
        response = self.connection.request(action=action, data=req_data, headers=headers, method='POST')
    except DurableDNSException:
        e = sys.exc_info()[1]
        if ('Record    does    not    exists' in e.message):
            raise RecordDoesNotExistError(record_id=record.id, driver=self, value=e.message)
        if ('Zone    does    not    exist' in e.message):
            raise ZoneDoesNotExistError(zone_id=record.zone.id, driver=self, value=e.message)
        raise e
    return (response.status in [httplib.OK])
