'Returns the representation data for the resource'

def _get_data(self, resource, representation):

    request = S3Request(prefix=resource.prefix, name=resource.name, extension=representation)
    if request.transformable():
        return resource.export_xml(stylesheet=request.stylesheet(), pretty_print=True)
    else:
        if (representation == 'csv'):
            exporter = S3Exporter().csv
        elif (representation == 'pdf'):
            exporter = S3Exporter().pdf
        elif (representation == 'xls'):
            exporter = S3Exporter().xls
        elif (representation == 'json'):
            exporter = S3Exporter().json
        return exporter(resource)
