You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (Commented) (JIRA)" <ji...@apache.org> on 2011/10/09 16:23:30 UTC

[jira] [Commented] (JENA-132) N3 / TURTLE serializers ignore relative URI

    [ https://issues.apache.org/jira/browse/JENA-132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13123693#comment-13123693 ] 

Andy Seaborne commented on JENA-132:
------------------------------------

The output from the TTL writer is correct RDF - it just has not used the base URI to abbreviate the data.  It's the same triples.

The output files from the TTL writer are a failthful representation of the triples and are fully portable (i.e. the RDF will be read the same where ever the file is read from). Some people would argue this is the better behaviour to the relative URIs generated by the RDF/XML-ABBREV writer.

A contribution to enable the writing of relative URIs by the TTL writer would be good.

Reclassified as a feature request.
                
> N3 / TURTLE serializers ignore relative URI
> -------------------------------------------
>
>                 Key: JENA-132
>                 URL: https://issues.apache.org/jira/browse/JENA-132
>             Project: Jena
>          Issue Type: Bug
>          Components: Jena, RDF API
>            Reporter: Alexandre Bertails
>
> 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

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira