On 8/23/2013 2:06, Andy Seaborne wrote:
Based on your experience, when does it make a difference?

A number of our test cases broke, and I tracked it down to the case where the base URI of a graph ends with something like .owl yet the file is saved in ttl. A number of our ontologies used such naming conventions in the past, and I wouldn't be surprised if others are now in the same situation where they started with some base URI and used it in owl:imports etc, and then changed the serialization to Turtle. While the base URI ends with .owl, the input stream is still coming from a local file ending with .ttl. But our application knows that these are really turtle files, and since we take control of owl:imports this is IMHO a valid scenario.


There are three pieces of information to consider: content type (if from the web), the user specified language and the file extension. What happens when there is contradictory information is a pragmatic decision. Hence the "don't trust text/plain" part -- too many Turtle files come back text plain!

Yes that's fine but our case above is not related to the HTTP response type, but should rely entirely on the information passed into the read as third parameter (FileUtils.langTurtle etc). If the latter is provided then it should override anything else, and things like response type and file ending should only be used if no language "hint" has been provided. The general mismatch remains that the Model.read API states that the language is the file type, while RIOT changes this to be a hint only. I believe changing the order of the two if statements from my previous message would be a better implementation, and restore the behavior of the Model.read API.

Hope this clarifies things.

Thanks,
Holger

Reply via email to