Details
-
Wish
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
Unlike RDF/XML* serializers, N3 and TURTLE ignore the base URI in their output.
val turtle =
"""
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
<#JL>
a foaf:Person ;
foaf:homepage </2007/wiki/people/JoeLambda> ;
foaf:img <images/me.jpg> ;
foaf:name "Joe Lambda" .
"""
val base = "http://w3.org/People/Joe"
val model =
{ val m = ModelFactory.createDefaultModel() m.getReader("TURTLE").read(m, new StringReader(turtle), base) m }model.getWriter("TTL").write(model, System.out, base) // doesn't work as expected
model.getWriter("RDF/XML-ABBREV").write(model, System.out, base) // this one is ok