Dave Reynolds wrote:
> First, there is a bug in the Jena reader's content negotiation. The FOAF
> site is configured to return human readable HTML instead of RDF unless you
> get the content negotiation right. Going direct to the URL Libby gave gets
> round that.
If you're seeing this issue with more than just the foaf
schema and need a more generic solution, a workaround is to
open the stream yourself supplying the appropriate headers,
thus:
String u = "http://xmlns.com/foaf/0.1/"; // or whatever
URL url = new URL(u);
URLConnection urlc = url.openConnection();
urlc.setRequestProperty("Accept", "application/rdf+xml");
urlc.connect();
InputStream in = urlc.getInputStream();
model.read(inStream, u);
inStream.close();
_______________________________________________
rich rdfx.org