TriG is a serialization format for RDF (
Resource Description Framework
The Resource Description Framework (RDF) is a method to describe and exchange graph data. It was originally designed as a data model for metadata by the World Wide Web Consortium (W3C). It provides a variety of syntax notations and formats, of whi ...
) graphs. It is a plain text format for serializing
named graph
Named graphs are a key concept of Semantic Web architecture in which a set of Resource Description Framework statements (a graph) are identified using a URI, allowing descriptions to be made of that set of statements such as context, provenance ...
s and RDF Datasets which offers a compact and readable alternative to the XML-based
TriX syntax.
Example
This example encodes three interlinked named graphs:
*
http://www.example.org/exampleDocument#G1
*
http://www.example.org/exampleDocument#G2
*
http://www.example.org/exampleDocument#G3
@prefix rdf: .
@prefix xsd: .
@prefix swp: .
@prefix dc: .
@prefix ex: .
@prefix : .
:G1
:G2
:G3
External links
TriG Specification (2007)RDF 1.1 TriG W3C Recommendation (2014)Yacker TriG validator which does not handle sub-graphs, and does not validate the above example.
Resource Description Framework
Syntax
Computer file formats
{{web-stub