serve an RDF resource as a SPARQL result and wrap requests as JSONP
Warning: this is not a "beautiful" piece of code, this is a simple proxy that we use to clean some of the issues that affect the web of data
LodLive uses this to convert RDF resources that are not publish in an endpoint and to wrap responses that are not able to be served in JSONP format
feel free to modify the code!