Is there a workaround for the same origin policy limitation that prevents an HTML page to load a URI outside of the origin domain of the webpage ? Basically what I would like to do is : 1/ parse RDFa from the page content and gather resource URIs 2/ fetch these URIs, get some data 3/ print info in popups or infobox on the page. All of that in the browser.
I know rdfquery and rdfstore-js, I know I can query SPARQL endpoints such as DBpedia returning JSONP, but I am really looking for a way to dereference the URI from the webpage. I think Talis did some RDF-to-JSONP converter (morph.talis.com or something like that), not running anymore, that would return RDF content of a URI in JSONP. That would be perfect for me, does this kind of service still exists somewhere ?
Are you looking to load the URI simply to show the data or to parse it?
If you simply want to show the data, you could use an
If, however, you want to parse it, that's a little more complicated using only the browser. You would need a server-side component (such as the Tails app you mentioned) to load the URI, and then parse it depending on its content: URI's response may contain HTML, RDF/XML, Turtle, or one of the many other formats... you would need to make sense of the format involved, and then return proper JSONP, so that it can be consumed by your browser app.
I'm not aware of a server-side component that does this job, however, you could possibly easily create one yourself using the popular Google Apps Script platform (it's free), or any other server-side language you wish.
Hope this helps.
I decided to actually implement this using Apps Script myself, here you can find the simple code: https://gist.github.com/lmatteis/5013182 and also instructions on how to use it!