5 library(semweb/turtle): Turtle: Terse RDF Triple Language
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog Semantic Web Library 3.0
        • library(semweb/turtle): Turtle: Terse RDF Triple Language
          • rdf_read_turtle/3
          • rdf_load_turtle/3
          • rdf_process_turtle/3
          • turtle_pn_local/1
          • turtle_write_quoted_string/2
          • turtle_write_uri/2
          • rdf_db:rdf_load_stream/3
          • rdf_save_ntriples/2
          • rdf_save_canonical_trig/2
          • rdf_save_trig/2
          • rdf_save_canonical_turtle/2
          • rdf_save_turtle/2
Availability::- use_module(library(semweb/turtle)).
Source[det]rdf_process_turtle(+Input, :OnObject, +Options)
Streaming Turtle parser. The predicate rdf_process_turtle/3 processes Turtle data from Input, calling OnObject with a list of triples for every Turtle statement found in Input. OnObject is called as below, where ListOfTriples is a list of rdf(S,P,O) terms for a normal Turtle file or rdf(S,P,O,G) terms if the GRAPH keyword is used to associate a set of triples in the document with a particular graph. The Graph argument provides the default graph for storing the triples and Line is the line number where the statement started.
call(OnObject, ListOfTriples, Graph:Line)

This predicate supports the same Options as rdf_load_turtle/3.

Errors encountered are sent to print_message/2, after which the parser tries to recover and parse the remainder of the data.

See also
This predicate is normally used by load_rdf/2 for processing RDF data.