Apache Jena
  1. Apache Jena
  2. JENA-132

N3 / TURTLE serializers ignore relative URI

    Details

    • Type: Wish Wish
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Jena 2.10.1
    • Component/s: Jena, RDF API
    • Labels:
      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

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Andy Seaborne
            Reporter:
            Alexandre Bertails
          • Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development