Copyright © 2004-2025World Wide Web Consortium.W3C®liability,trademark andpermissive document license rules apply.
The Resource Description Framework (RDF) is a framework for representing information in the Web. This document defines an abstract syntax (a data model) which serves to link all RDF-based languages and specifications. The abstract syntax has two key data structures:
RDF 1.2 introduces the ability to use anRDF triple as atriple term, in theobject position of anothertriple. RDF 1.2 also introducesdirectional language-tagged strings, which contain abase direction element that allows the initial text direction to be specified for presentation by a user agent.
RDF 1.2 Concepts introduces key concepts and terminology for RDF 1.2, discusses datatyping, and the handling offragment identifiers in IRIs within RDF graphs.
This section describes the status of this document at the time of its publication. A list of currentW3C publications and the latest revision of this technical report can be found in theW3C standards and drafts index at https://www.w3.org/TR/.
This document is part of the RDF 1.2 document suite. It is the central RDF 1.2 specification and defines the core RDF concepts. Test suites and implementation reports of a number of RDF 1.2 specifications that build on this document are available through theRDF 1.1 Test Cases document [RDF11-TESTCASES].
RDF 1.2 Concepts is an update to [RDF11-CONCEPTS], which was itself, an update to [RDF-CONCEPTS-20040210].
Determine how to reference 1.2 test cases.
This document was published by theRDF-star Working Group as a Working Draft using theRecommendation track.
Publication as a Working Draft does not imply endorsement byW3C and its Members.
This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress. Future updates to this specification may incorporatenew features.
This document was produced by a group operating under theW3C Patent Policy.W3C maintains apublic list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes containsEssential Claim(s) must disclose the information in accordance withsection 6 of theW3C Patent Policy.
This document is governed by the03 November 2023W3C Process Document.
This document is one of ten RDF 1.2 and twelve SPARQL 1.2 documents produced by theRDF-star Working Group.
RDF 1.2 Documents:
SPARQL 1.2 Documents:
This section is non-normative.
TheResource Description Framework (RDF) is a framework for representing information in the Web.
This document defines an abstract syntax (a data model) which serves to link all RDF-based languages and specifications, including the following:
The core structure of the abstract syntax is a set oftriples, each consisting of asubject, apredicate and anobject. A set of such triples is called anRDF graph. An RDF graph can be visualized as a node and directed-arc diagram, in which each triple is represented as a node-arc-node link.
There can be four kinds ofnodes in anRDF graph:IRIs,literals,blank nodes, andtriple terms.
There is a mixture of "Abstract Syntax" and "Data Model". We should have a consistent way to say "Abstract Syntax" vs "Data Model". One way is to use "Abstract Syntax" as the basis of semantics and usually say "Data Model" in Concepts otherwise.
AnyIRI orliteraldenotes something in the world (the "universe of discourse"). These things are calledresources. Anything can be a resource, including physical things, documents, abstract concepts, numbers and strings; the term is synonymous with "entity" as it is used inRDF 1.2 Semantics [RDF12-SEMANTICS]. The resource denoted by anIRI is called itsreferent, and the resource denoted by a literal is called itsliteral value. Literals havedatatypes that define the range of possible values, such as strings, numbers, and dates. Special kinds of literals —language-tagged strings anddirectional language-tagged strings — respectively denote plain-text strings in a natural language, and plain-text strings in a natural language including an initial text direction.
Asserting anRDF triple says thatsome relationship, indicated by thepredicate, holds between theresourcesdenoted by thesubject andobject. This statement corresponding to an RDF triple is known as anRDF statement. The predicate itself is anIRI and denotes aproperty, that is, aresource that can be thought of as a binary relation. (Relations that involve more than two entities can only beindirectly expressed in RDF [SWBP-N-ARYRELATIONS].)
UnlikeIRIs andliterals,blank nodes do not identify specificresources.Statements involving blank nodes say that something with the given relationships exists, without explicitly naming it.
Theresourcedenoted by anIRI is also called itsreferent. For some IRIs with particular meanings, such as those identifying XSD datatypes, the referent is fixed by this specification. For all other IRIs, what exactly isdenoted by any givenIRI is not defined by this specification. Other specifications may fixIRI referents, or apply other constraints on what may be the referent of anyIRI.
Guidelines for determining thereferent of anIRI are provided in other documents, likeArchitecture of the World Wide Web, Volume One [WEBARCH] andCool URIs for the Semantic Web [COOLURIS]. A very brief, informal, and partial account follows:
http://www.w3.org/ns/org#
.Perhaps the most important characteristic ofIRIs in web architecture is that they can bedereferenced, and hence serve as starting points for interactions with a remote server. This specification is not concerned with such interactions. It does not define an interaction model. It only treats IRIs as globally unique identifiers in a graph data model that describes resources. However, those interactions are critical to the concept ofLinked Data Design Issues, [LINKED-DATA], which makes use of the RDF data model and serialization formats.
AnRDF vocabulary is a collection ofIRIs intended for use inRDF graphs. For example, the IRIs documented in [RDF12-SCHEMA] are the RDF Schema vocabulary. RDF Schema can itself be used to define and document additional RDF vocabularies. Some such vocabularies are mentioned in the Primer [RDF12-PRIMER].
TheIRIs in anRDF vocabulary often begin with a common substring known as anamespaceIRI. Some namespace IRIs are associated by convention with a short name known as anamespace prefix. Some examples:
Namespace prefix | NamespaceIRI | RDF vocabulary |
---|---|---|
rdf | http://www.w3.org/1999/02/22-rdf-syntax-ns# | The RDF built-in vocabulary [RDF12-SCHEMA] |
rdfs | http://www.w3.org/2000/01/rdf-schema# | The RDF Schema vocabulary [RDF12-SCHEMA] |
xsd | http://www.w3.org/2001/XMLSchema# | TheRDF-compatible XSD types |
In some serialization formats it is common to abbreviateIRIs that start withnamespace IRIs by using anamespace prefix in order to assist readability. For example, theIRIhttp://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral
would be abbreviated asrdf:XMLLiteral
. Note however that these abbreviations arenot valid IRIs, and must not be used in contexts where IRIs are expected. Namespace IRIs and namespace prefixes arenot a formal part of the RDF data model. They are merely a syntactic convenience for abbreviating IRIs.
The term “namespace” on its own does not have a well-defined meaning in the context of RDF, but is sometimes informally used to mean “namespaceIRI” or “RDF vocabulary”.
Atriple term is anRDF triple used as anRDF term in theobject position of another triple.
Atriple term is not necessarily asserted, allowing statements to be made about other statements that may not be asserted within anRDF graph. This allows statements to be made about relationships that may be contradictory. For atriple term to be asserted, it must also appear in a graph as anasserted triple.
Atriple term can be used as the object of atriple with the predicaterdf:reifies
; such atriple is then areifying triple. Thesubject of thattriple is called areifier. Assertions on thetriple term are made using thereifier. A concrete syntax may provide a special notation for specifyingreifying triples.
Using thereifier as an indirect way of referencing atriple term allows multiple groups of assertions to be separated from each other, which might be necessary if the sametriple term was derived from different sources. Assertions are always made using thereifier, which can be thesubject orobject of different triples. Concrete syntaxes, such as Turtle [RDF12-TURTLE], may have shortcuts for capturing atriple term with itsreifier.
The following diagram represents a statement and a reification of an unassertedtriple term.
A variation on the graph shown inFigure2 can be described where thetriple term is alsoasserted.
Note that atriple term may also have anothertriple term as anobject.
The RDF data model isatemporal:RDF graphs are static snapshots of information.
However,RDF graphs can express information about events and about temporal aspects of other entities, given appropriatevocabulary terms.
SinceRDF graphs are defined as mathematical sets, adding or removingtriples from an RDF graph yields a different RDF graph.
We informally use the termRDF source to refer to a persistent yet mutable source or container ofRDF graphs. An RDF source is aresource that may be said to have a state that can change over time. A snapshot of the state can be expressed as an RDF graph. For example, any web document that has an RDF-bearing representation may be considered an RDF source. Like all resources, RDF sources may be named withIRIs and therefore described in other RDF graphs.
Intuitively speaking, changes in the universe of discourse can be reflected in the following ways:
As RDF graphs are sets of triples, they can be combined easily, supporting the use of data from multiple sources. Nevertheless, it is sometimes desirable to work with multiple RDF graphs while keeping their contents separate.RDF datasets support this requirement.
AnRDF dataset is a collection ofRDF graphs. All but one of these graphs have an associatedIRI or blank node. They are callednamed graphs, and theIRI or blank node is called thegraph name. The remaining graph does not have an associatedIRI, and is called thedefault graph of the RDF dataset.
There are many possible uses forRDF datasets. One such use is to hold snapshots of multipleRDF sources.
AnRDF triple encodes aproposition — a simple logical expression, describing a relationship between two entities. Anasserted triple is a claim that the corresponding proposition is true. AnRDF graph is the conjunction (logicalAND) of all the claims made by itsasserted triples. The precise details of this meaning ofRDF triples andRDF graphs are the subject ofRDF 1.2 Semantics [RDF12-SEMANTICS], which yields the following relationships betweenRDF graphs:
RDF Concepts does not define notions like entailment, equivalence, and inconsistency.
These terms are described in RDF Semantics and only loosely described in RDF Concepts.
The various links, etc., need to be adjusted to make RDF Semantics primary and RDF Concepts secondary.
The situation for notions like literal, triple, etc., is different. There RDF Concepts is primary.
Anentailment regime [RDF12-SEMANTICS] is a specification that defines precise conditions that make these relationships hold. RDF itself recognizes only some basic cases of entailment,equivalence and inconsistency. Other specifications, such asRDF 1.2 Schema [RDF12-SCHEMA] andOWL 2 [OWL2-OVERVIEW], add more powerful entailment regimes, as do some domain-specificvocabularies.
This specification does not constrain how implementations use the logical relationships defined byentailment regimes. Implementations may or may not detectinconsistencies, and may make all, some or noentailed information available to users.
AnRDF document is a document that encodes anRDF graph orRDF dataset in aconcrete RDF syntax, such as Turtle [RDF12-TURTLE], RDFa [RDFA-CORE], JSON-LD [JSON-LD11], or TriG [RDF12-TRIG]. RDF documents enable the exchange of RDF graphs and RDF datasets between systems.
Aconcrete RDF syntax may offer many different ways to encode the sameRDF graph orRDF dataset, for example through the use ofnamespace prefixes,IRI references,blank node identifiers, and different ordering of triples. While these aspects can have great effect on the convenience of working with theRDF document, they are not significant for its meaning.
As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.
The key wordsMAY,MUST,MUST NOT,RECOMMENDED,SHOULD, andSHOULD NOT in this document are to be interpreted as described inBCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
This specification,RDF 1.2 Concepts and Abstract Syntax, defines a data model and related terminology for use in other specifications, such asconcrete RDF syntaxes, API specifications, and query languages. Implementations cannot directly conform toRDF 1.2 Concepts and Abstract Syntax, but can conform to such other specifications that normatively reference terms defined here.
This specification establishes two conformance levels:
The conformance levels described above are tentative, and still the subject of group discussion. An alternative to conformance levels, "profiles", may be adopted instead, abandoned, or described in another specification.
Change "Classic Conformance" to "Basic Conformance" and define them as profiles.
RDF uses Unicode [Unicode] as the fundamental representation for string values. Within this, and related specifications, the termstring, orRDF string, is used to describe an ordered sequence of zero or moreUnicode code points which areUnicode scalar values. Unicode scalar values do not include thesurrogate code points. Note that mostconcrete RDF syntaxes require the use of the UTF-8 character encoding [RFC3629], and use the\u0000
or\U00000000
forms to express certain non-character values.
A string is identical to another string if it consists of the same sequence of code points. An implementationMAY determine string equality by comparing thecode units of two strings that use the sameUnicode character encoding (UTF-8 or UTF-16) without decoding the string into aUnicode code point sequence.
AnRDF graph is a set ofRDF triples.
AnRDF triple is said to beasserted in anRDF graph if it is an element of theRDF graph.
AnRDF triple (often simply called "triple") is a 3-tuple that is defined inductively as follows:
The three components (s,p,o) of anRDF triple are respectively called thesubject,predicate andobject of the triple.
The set ofnodes of anRDF graph is the set ofsubjects andobjects of theasserted triples of the graph. It is possible for apredicateIRI to also occur as anode in the same graph.
Triple equality: Two triples (s,p,o) and (s',p',o') are equal (the sameRDF triple) if and only if all of the following three conditions hold.
IRIs,literals,blank nodes, andtriple terms are collectively known asRDF terms.
IRIs,literals andblank nodes are said to beatomicRDF terms.
RDF term equality: TwoRDF termst andt' are equal (the sameRDF term) if and only if one of the following four conditions holds:
http://example.org/
is not equal to a literal whoselexical form ishttp://example.org/
.The set ofRDF termsappearing in anRDF triplet is defined inductively as follows:
By extension, anRDF term is said toappear in anRDF graph if it appears in anasserted triple of that graph. AnRDF triple is said toappear in anRDF graph if it is either anasserted triple of that graph or atriple termappearing in that graph.
AnRDF term is said to beground if it is anIRI, aliteral, or atriple term in which onlyground termsappear. By extension, anRDF triple is said to beground if itssubject,predicate, andobject are all ground. AnRDF graph is said to beground if all itsasserted triples areground.
AnIRI (Internationalized Resource Identifier) within an RDF graph is astring that conforms to the syntax defined in RFC 3987 [RFC3987].
AnIRI in the RDF abstract syntaxMUST beresolved per [RFC3986] andMUST NOT be arelative reference. AnIRIMAY contain afragment identifier. AnIRISHOULD follow rules defined by theIRI scheme.
IRI equality: Two IRIs are equal if and only if they consist of the same sequence ofUnicode code points, as in Simple String Comparison insection 5.3.1 of [RFC3987]. (This is done in the abstract syntax, so the IRIs are resolved IRIs with no escaping or encoding.) Further normalizationMUST NOT be performed before this comparison.
For convenience, a complete [ABNF] grammar from [RFC3987] is provided inE.IRI Grammar.
URIs and IRIs: IRIs are a generalization ofURIs [RFC3986] that permits a wider range of Unicode characters [UNICODE]. EveryURI and URL is anIRI, but not everyIRI is anURI. In RDF, IRIs are used asIRI references, as defined in [RFC3987]section 1.3. AnIRI reference is common usage of an Internationalized Resource Identifier. AnIRI reference refers to either a resolvedIRI orrelativeIRI reference, as described by theIRI-reference production inE.IRI Grammar. The abstract syntax uses only fully resolvedIRIs. When IRIs are used in operations that are only defined for URIs, they must first be converted according to the mapping defined insection 3.1 of [RFC3987]. A notable example is retrieval over the HTTP protocol. The mapping involves UTF-8 encoding of non-ASCII characters, %-encoding of octets not allowed in URIs, and Punycode-encoding of domain names.
URLs: TheURL Standard is largely compatible with [RFC3987] IRIs, but is based on a processing model important for implementation within web browsers and are not described using an [ABNF] grammar.
RelativeIRI references: Someconcrete RDF syntaxes permitrelativeIRI references as a convenient shorthand that allows authoring of documents independently from their final publishing location. RelativeIRI references must beresolved against abaseIRI. Therefore, the RDF graph serialized in such syntaxes is well-defined only if abaseIRI can be established [RFC3986].
URI Schemes: Implementations are encouraged to enforce the scheme-specific rules of the common schemes, such as thescheme rules for HTTP/HTTPS and theDID syntax. Implementations ignoreURI scheme rules for schemes they do not recognize.
IRI normalization: Interoperability problems can be avoided by minting only IRIs that are normalized according toSection 5 of [RFC3987].
http://example/
is preferred overhttp://example:80/
.%3F
" is preferred over "%3f
".http://example/
is preferred over having no pathhttp://example
././
" and "/../
" in the path component of anIRI.Literals are used for values such as strings, numbers, and dates.
Aliteral in anRDF graph consists of two, three, or four elements, as follow:
http://www.w3.org/1999/02/22-rdf-syntax-ns#langString
orhttp://www.w3.org/1999/02/22-rdf-syntax-ns#dirLangString
, a non-emptylanguage tag as defined by [BCP47]. The language tagMUST be well-formed according tosection 2.2.9 of [BCP47], andMUST be treated accordingly, that is, in a case insensitive manner. Two [BCP47]-complying strings that differ only by case represent the samelanguage tag.http://www.w3.org/1999/02/22-rdf-syntax-ns#dirLangString
, abase direction thatMUST be one of the following:ltr
, indicating that the initial text direction is set to left-to-rightrtl
, indicating that the initial text direction is set to right-to-leftA literal is alanguage-tagged string if the third element is present and the fourth element is not present. A literal is adirectional language-tagged string if both the third element and fourth elements are present.
Literal term equality: two literals are term-equal (the sameRDF term) if and only if the following are all true:
ltr
, or bothrtl
.Some concrete syntaxesMAY supportsimple literals consisting of only alexical form without anydatatypeIRI,language tag, orbase direction. Simple literals are syntactic sugar for abstract syntaxliterals with thedatatypeIRIhttp://www.w3.org/2001/XMLSchema#string
(which is commonly abbreviated asxsd:string
).
Similarly, most concrete syntaxes representlanguage-tagged strings anddirectional language-tagged strings without thedatatypeIRI because it is always eitherhttp://www.w3.org/1999/02/22-rdf-syntax-ns#langString
(rdf:langString
) orhttp://www.w3.org/1999/02/22-rdf-syntax-ns#dirLangString
(rdf:dirLangString
), respectively.
Anystring complying with [BCP47]MAY be used to represent alanguage tag in concrete syntaxes or implementations. Such stringsMAY be case normalized (for example, by canonicalizing as defined byBCP 47 section 4.5). Alternatively, an implementationMAY preserve the case from the original representation, provided that it processes it in a case-insensitive manner.
Theliteral value associated with aliteral is defined as follows.
It follows from the above that two literals can have the same value without being the sameRDF term. For example:
"1"^^xsd:integer"01"^^xsd:integer
denote the samevalue, but are not the same literalRDF term because theirlexical forms differ.
Blank nodes are disjoint fromIRIs andliterals. Otherwise, the set of possible blank nodes is arbitrary. RDF makes no reference to any internal structure of blank nodes.
Blank node equality: Two blank nodes are equal if and only if they are the same blank node.
Blank node identifiers are local identifiers that are used in someconcrete RDF syntaxes or RDF store implementations. They are always locally scoped to the file or RDF store, and arenot persistent or portable identifiers for blank nodes. Blank node identifiers arenot part of the RDF abstract syntax, but are entirely dependent on the concrete syntax or implementation. The syntactic restrictions on blank node identifiers, if any, therefore also depend on the concrete RDF syntax or implementation. Implementations that handle blank node identifiers in concrete syntaxes need to be careful not to create the same blank node from multiple occurrences of the same blank node identifier except in situations where this is supported by the syntax.
The term "blank node label" is sometimes used informally as an alternative to the termblank node identifier. This alternative was also used in earlier versions of some RDF-related specifications such as [SPARQL11-QUERY]. In the interest of consistency, the use of this alternative term is discouraged now.
AnRDF triple used as theobject of anothertriple is called atriple term. In a givenRDF graph, atriple can appear as atriple term, anasserted triple, or both.
Triple term equality: Since triple terms aretriples, equality of triple terms is the same astriple equality.
Everytriple with atriple term as itsobjectSHOULD usehttp://www.w3.org/1999/02/22-rdf-syntax-ns#reifies
(rdf:reifies
) as itspredicate. Everytriple whoseobject is not atriple termSHOULD NOT usehttp://www.w3.org/1999/02/22-rdf-syntax-ns#reifies
(rdf:reifies
) as itspredicate.
This section introduces a notion of graph isomorphism forRDF graphs which is based on a mapping betweenRDF terms that maps blank nodes to blank nodes and is the identity function for IRIs and literals.
A functionM from the set of allRDF terms into that same set is called anisomorphic RDF-term mapping if it is has all of the following properties:
TwoRDF graphsG andG' areisomorphic (that is, they have the same form) if there exists anisomorphic RDF-term mappingM such that the triple (s,p,o) is inG if and only if the triple (M(s),M(p),M(o) ) is inG'.
With this definition,M shows how each blank node inG can be replaced with a new blank node to giveG'. Graph isomorphism is needed to support the RDF Test Cases [RDF11-TESTCASES] specification.
This section is non-normative.
Thebase direction of adirectional language-tagged string provides a means of establishing the initial direction of text, including text which is a mixture of right-to-left and left-to-right scripts. TheUnicode Bidirectional Algorithm [I18N-Glossary] provides support for automatically rendering a sequence of characters in logical order, so that they are visually ordered as expected, but this is not sufficient to correctly render bidirectional text.
For example, some text with a language tag "he
" might be displayed in a left-to-right context (such as an English web page) asפעילות הבינאום,W3C, which is incorrect. When provided to a user agent including base direction information (such as using HTML'sdir
attribute) it can then be correctly presented as:
In the absence of an explicit initial text direction, theUnicode Bidirectional Algorithm detects the text direction from the content. This depends on the first strongly directional character in the text or on the context. To avoidspillover effects, users need to employbidi isolation whenever text is inserted into a larger document. For example, "<bdi lang="he">ספרים בינלאומיים!</bdi>
" displays the Hebrew characters in a right-to-left fashion — i.e., as "ספרים בינלאומיים!" — while they would be stored in memory as "ספרים בינלאומיים!"
Blank nodes do not have identifiers in the RDF abstract syntax. Theblank node identifiers introduced by some concrete syntaxes have only local scope and are purely an artifact of the serialization.
In situations where stronger identification is needed, systemsMAY systematically replace some or all of the blank nodes in an RDF graph withIRIs. Systems wishing to do thisSHOULD mint a new, globally uniqueIRI (aSkolemIRI) for each blank node so replaced.
Systems that want Skolem IRIs to be recognizable outside of the system boundariesSHOULD use a well-knownIRI [RFC8615] with the registered namegenid
. This is anIRI that uses the HTTP or HTTPS scheme, or another scheme that has been specified to use well-known IRIs; and whose path component starts with/.well-known/genid/
.
For example, the authority responsible for the domainexample.com
could mint the following recognizable SkolemIRI:
http://example.com/.well-known/genid/d26a2d0e98334696f4ad70a677abc1f6
RFC 8615 [RFC8615] only specifies well-known URIs, not IRIs. For the purpose of this document, a well-knownIRI is anyIRI that results in a well-knownURI afterIRI-to-URI mapping [RFC3987].
AnRDF dataset is a collection ofRDF graphs, and comprises:
Blank nodes can be shared between graphs in anRDF dataset.
Despite the use of the word “name” in “named graph”, thegraph name is not required todenote the graph. It is merely syntactically paired with the graph. RDF does not place any formal restrictions on whatresource the graph name may denote, nor on the relationship between that resource and the graph. A discussion of different RDF dataset semantics can be found in [RDF11-DATASETS].
SomeRDF dataset implementations do not track emptynamed graphs. Applications can avoid interoperability issues by not ascribing importance to the presence or absence of empty named graphs.
SPARQL version 1.2 [SPARQL12-CONCEPTS] usesthe same concept of an RDF Dataset as RDF versions 1.1 and 1.2, in which the graph names of named graphs may be IRIs or blank nodes. In contrast, version 1.1 of the SPARQL Query Language [SPARQL11-QUERY] only allowed graph names to be IRIs.
TwoRDF datasetsD1 andD2 (respectively, withdefault graphsDG1 andDG2 and setsNG1 andNG2 ofnamed graphs) aredataset-isomorphic if and only if there exists anisomorphic RDF-term mappingM for which all of the following properties hold:
This section is non-normative.
Web resources may have multiple representations that are made available viacontent negotiation [WEBARCH]. A representation may be returned in an RDF serialization format that supports the expression of bothRDF datasets andRDF graphs. If anRDF dataset is returned and the consumer is expecting anRDF graph, the consumer is expected to use theRDF dataset's default graph.
This section is non-normative.
Aquad is atriple associated with an optionalgraph name and is used when referring to triples within anRDF dataset.
Aquad can be represented as a tuple composed ofsubject,predicate,object, and an optionalgraph name.
AnRDF dataset can be considered to be a set ofquads where quads with nograph name supply thetriples of thedefault graph, and quads with the same graph name supply the triples of thenamed graph with that name.
Although aquad without agraph name consists of the same three components as atriple, it is a distinct concept, as it specifically captures the notion of a triple within thedefault graph of anRDF dataset.
Datatypes are used with RDFliterals to represent values such as strings, numbers and dates. The datatype abstraction used in RDF is compatible with XML Schema [XMLSCHEMA11-2]. Any datatype definition that conforms to this abstractionMAY be used in RDF, even if not defined in terms of XML Schema. RDF re-uses many of the XML Schema built-in datatypes, and defines three additional datatypes,
,rdf:JSON
, andrdf:HTML
.rdf:XMLLiteral
Adatatype consists of alexical space, avalue space and alexical-to-value mapping, and is identified by one or moreIRIs.
Thelexical space of a datatype is a set ofstrings.
Thelexical-to-value mapping of a datatype is a set of pairs whose first element belongs to thelexical space, and the second element belongs to thevalue space of the datatype. Each member of the lexical space is paired with exactly one value, and is alexical representation of that value. The mapping can be seen as a function from the lexical space to the value space.
Language-tagged strings have thedatatypeIRIhttp://www.w3.org/1999/02/22-rdf-syntax-ns#langString
(commonly abbreviated asrdf:langString
). No datatype is formally defined for thisIRI because the definition ofdatatypes does not accommodatelanguage tags in thelexical space. Thevalue space associated with this datatypeIRI is the set of all pairs that consist of a string and a language tag. Similarly,directional language-tagged stringshttp://www.w3.org/1999/02/22-rdf-syntax-ns#dirLangString
(commonly abbreviated asrdf:dirLangString
) also have abase direction in the value space. Thevalue space associated with this datatypeIRI is the set of all 3-tuples of a string, a language tag and a base direction.
For example, the XML Schema datatypexsd:boolean
, where each member of thevalue space has two lexical representations, is defined as follows:
true
”, “false
”, “1
”, “0
”}true
”,true>, <“false
”,false>, <“1
”,true>, <“0
”,false>, }Theliterals that can be defined using this datatype are:
Literal | Value |
---|---|
<“true ”,xsd:boolean > | true |
<“false ”,xsd:boolean > | false |
<“1 ”,xsd:boolean > | true |
<“0 ”,xsd:boolean > | false |
IRIs of the formhttp://www.w3.org/2001/XMLSchema#xxx
, wherexxx
is the name of a datatype, denote the built-in datatypes defined inW3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes [XMLSCHEMA11-2]. The XML Schema built-in types listed in the following table are theRDF-compatible XSD types. Their use isRECOMMENDED.
Readers might note that the only safe datatypes for transferring binary information arexsd:hexBinary
andxsd:base64Binary
.
Datatype | Value space (informative) | |
---|---|---|
Core types | xsd:string | Character strings |
xsd:boolean | true, false | |
xsd:decimal | Arbitrary-precision decimal numbers | |
xsd:integer | Arbitrary-size integer numbers | |
IEEE floating-point numbers | xsd:double | 64-bit floating point numbers incl. ±Inf, ±0, NaN |
xsd:float | 32-bit floating point numbers incl. ±Inf, ±0, NaN | |
Time and date | xsd:date | Dates (yyyy-mm-dd) with or without timezone |
xsd:time | Times (hh:mm:ss.sss…) with or without timezone | |
xsd:dateTime | Date and time with or without timezone | |
xsd:dateTimeStamp | Date and time with required timezone | |
Recurring and partial dates | xsd:gYear | Gregorian calendar year |
xsd:gMonth | Gregorian calendar month | |
xsd:gDay | Gregorian calendar day of the month | |
xsd:gYearMonth | Gregorian calendar year and month | |
xsd:gMonthDay | Gregorian calendar month and day | |
xsd:duration | Duration of time | |
xsd:yearMonthDuration | Duration of time (months and years only) | |
xsd:dayTimeDuration | Duration of time (days, hours, minutes, seconds only) | |
Limited-range integer numbers | xsd:byte | -128…+127 (8 bit) |
xsd:short | -32768…+32767 (16 bit) | |
xsd:int | -2147483648…+2147483647 (32 bit) | |
xsd:long | -9223372036854775808…+9223372036854775807 (64 bit) | |
xsd:unsignedByte | 0…255 (8 bit) | |
xsd:unsignedShort | 0…65535 (16 bit) | |
xsd:unsignedInt | 0…4294967295 (32 bit) | |
xsd:unsignedLong | 0…18446744073709551615 (64 bit) | |
xsd:positiveInteger | Integer numbers >0 | |
xsd:nonNegativeInteger | Integer numbers ≥0 | |
xsd:negativeInteger | Integer numbers <0 | |
xsd:nonPositiveInteger | Integer numbers ≤0 | |
Encoded binary data | xsd:hexBinary | Hex-encoded binary data |
xsd:base64Binary | Base64-encoded binary data | |
Miscellaneous XSD types | xsd:anyURI | Resolved or relativeURI andIRI references |
xsd:language | Language tags per [BCP47] | |
xsd:normalizedString | Whitespace-normalized strings | |
xsd:token | Tokenized strings | |
xsd:NMTOKEN | XML NMTOKENs | |
xsd:Name | XML Names | |
xsd:NCName | XML NCNames |
Thelexical-to-value mapping forxsd:float
andxsd:double
MUST use a method consistent withdoubleLexicalMap, whichMUST strictly conform to the rounding method described infloatPtRound [XMLSCHEMA11-2].
The other built-in XML Schema datatypes are unsuitable for various reasons andSHOULD NOT be used:
xsd:QName
andxsd:ENTITY
require an enclosing XML document context.xsd:ID
andxsd:IDREF
are for cross references within an XML document.xsd:NOTATION
is not intended for direct use.xsd:IDREFS
,xsd:ENTITIES
andxsd:NMTOKENS
are sequence-valued datatypes which do not fit the RDFdatatype model.Thevalue spaces ofxsd:double
andxsd:float
do not include all decimal numbers. For every literal of either of these two datatypes, the value of the literal is a value that can be represented as anIEEE 754-2008 binary floating point representation of the corresponding precision. For instance, the literal with lexical form"0.1"
and datatypexsd:float
denotes the number0.100000001490116119384765625
. Rather thanxsd:double
orxsd:float
, the datatypexsd:decimal
can be used to accurately capture arbitrary decimal numbers.
The notions of identity and equality are often considered to be the same but sometimes they are not. RDF Concepts needs to be clear what equality of literal values means.
This is important for xsd:float and xsd:double as they have different identity and equality. Identity is the relationship that is important for RDF datatypes, not equality.
Several RDF datatypes use equality in the sense of identity:
rdf:HTML "are considered equal"
rdf:XMLLiteral "are considerd equal"
RDF:JSON "are considerd equal"
Perhaps the best solution is to uniformly use "identical" instead of "equal" here.
On a side note:
Can DOM nodes end up being connected together in a way that does not form a tree? Loops are not allowed, as the mutation algorithms appear to check for potential loops, but there doesn't appear to be any check for repeated occurences of a node.
Datatypes are identified byIRIs.
If anyIRI of the formhttp://www.w3.org/2001/XMLSchema#xxx
is handled by an RDF implementation, itMUST refer to the RDF-compatible XSD type namedxsd:xxx
for every XSD type listed insection 5.1.
The datatypes identified by the three IRIs below are defined in Appendix A.Additional Datatypes:
http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral
refers to the datatype
rdf:XMLLiteral
.http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML
refers to the datatype
rdf:HTML
.http://www.w3.org/1999/02/22-rdf-syntax-ns#JSON
refers to the datatype
rdf:JSON
.RDF implementations are not required to handle all datatypes. Any literal typed with a datatype not handled by an RDF implementation is treated just like an unknownIRI, i.e., as referring to an unknown thing. ApplicationsMAY give a warning message if they are unable to determine the referent of anIRI used in a typed literal. RDF implementationsSHOULD NOT reject a literal with an unknown datatype as either a syntactic or semantic error.
Other specificationsMAY impose additional constraints ondatatype IRIs, for example, require support for certain datatypes.
Semantic extensions of RDF might choose to recognize other datatype IRIs and require each of them to refer to a fixed datatype. SeeRDF 1.2 Semantics [RDF12-SEMANTICS] for more information on semantic extensions.
The Web Ontology Language [OWL2-OVERVIEW] offers facilities for formally definingcustom datatypes that can be used with RDF. Furthermore, a practice for identifying user-defined simple XML Schema datatypes is suggested in [SWBP-XSCH-DATATYPES]. RDF implementations are not required to support either of these facilities.
In RDF 1.1,Recognized datatype IRIs were defined in RDF Concepts, overlapping withRDF Semantics, "recognizing" datatype IRIs forsemantic extensions.
This section is non-normative.
RDF usesIRIs, which may includefragment identifiers, as resource identifiers. The semantics of fragment identifiers isdefined in RFC 3986 [RFC3986]: They identify a secondary resource that is usually a part of, a view of, defined in, or described in the primary resource, and the precise semantics depend on the set of representations that might result from a retrieval action on the primary resource.
This section discusses the handling of fragment identifiers in representations that encodeRDF graphs.
In RDF-bearing representations of a primary resource, e.g.,<https://example.com/foo>
, the secondary resource identified by a fragment identifier, e.g.,bar
, is theresourcedenoted by the fullIRI in theRDF graph, which would be<https://example.com/foo#bar>
in this case. Since IRIs in RDF graphs can denote anything, this can be something external to the representation, or even external to the web.
In this way, the RDF-bearing representation acts as an intermediary between the web-accessible primary resource, and some set of possibly non-web or abstract entities that theRDF graph may describe.
In cases where other specifications constrain the semantics offragment identifiers in RDF-bearing representations, the encodedRDF graph should use fragment identifiers in a way that is consistent with these constraints. For example, in an HTML+RDFa document [HTML-RDFA], a fragment identifier such aschapter1
may identify a document section via the semantics of HTML's@name
or@id
attributes. Such anIRI, e.g.,<#chapter1>
, should then be taken todenote that same section in any RDFa-encodedtriples within the same document. Similarly, fragment identifiers should be used consistently in resources with multiple representations that are made available viacontent negotiation [WEBARCH]. For example, if the fragment identifierchapter1
identifies a document section in an HTML representation of the primary resource, then theIRI<#chapter1>
should be taken todenote that same section in all RDF-bearing representations of the same primary resource.
This section is non-normative.
It is sometimes convenient to loosen the requirements onRDF triples. For example, the completeness of the RDFS entailment rules is easier to show with a notion of symmetric RDF triples.
Asymmetric RDF triple allows the subject to be anyRDF term that is allowed in the object position, one of anIRI, ablank node, aliteral or atriple term. Asymmetric RDF graph is a set of symmetric RDF triples. Asymmetric RDF dataset comprises a distinguished symmetric RDF graph, and zero or more pairs that each associate anIRI or ablank node with a symmetric RDF graph.
Symmetric RDF triples, graphs, and datasets differ from standard normative RDFtriples,graphs, anddatasets only by allowingIRIs,blank nodes,literals, ortriple terms in the subject and object positions.
Ageneralized RDF triple is a triple having a subject, a predicate, and an object, where each can be anIRI, ablank node, atriple term, or aliteral. Ageneralized RDF graph is a set of generalized RDF triples. Ageneralized RDF dataset comprises a distinguished generalized RDF graph, and zero or more pairs each associating anIRI, ablank node, atriple term, or aliteral to a generalized RDF graph.
Generalized RDF triples, graphs, and datasets differ from standard normative RDFtriples,graphs, anddatasets only by allowingIRIs,blank nodes,triple terms, andliterals to appear in any position, i.e., as subject, predicate, object, or graph name.
Any user of symmetric or generalized RDF triples, graphs, or datasets needs to be aware that these notions are non-standard extensions of RDF, and their use may cause interoperability problems. There is no requirement for any RDF tool to accept, process, or produce anything beyond standard normative RDF triples, graphs, and datasets.
This section is non-normative.
Should we make this section normative?
This section provides transformations betweenFullRDF graphs (respectively,RDF datasets) andClassicRDF graphs (respectively,RDF datasets), to provide some level of interoperability between the different classes ofConformance.
Should we go even further and aim to provide interoperability betweenRDF 1.1 and RDF 1.2Full?
AT RISK: The Working Group may decide to replace the termsrdf:TripleTerm
,rdf:ttSubject
,rdf:ttPredicate
, andrdf:ttObject
used in this section with other terms, possibly in a different namespace.
These transformation are designed to be:
Encoding anRDF graph to ensure that it is consumable by an RDFClassic implementation is calledclassicizing it.Classicizing consists of repeating the following steps until notriple termappears in the graph, and the graph is therefore compliant with RDFClassic: picking atriple termtt thatappears in the graph; minting a freshblank nodeb (i.e., a blank node not yet in use in the graph); replacing all occurrences ofttappearing in the graph withb; and then adding the following triples to the graph (wheres,p, ando are respectively thesubject,predicate andobject oftt):
rdf:type
,rdf:TripleTerm
)rdf:ttSubject
,s)rdf:ttPredicate
,p)rdf:ttObject
,o)Note that this transformation isinformation preserving only when the input graph either has notriple termappearing in it, or contains noasserted triple (b,rdf:type
,rdf:TripleTerm
) whereb is ablank node. Implementations encountering this situationMUST report an error. This limitation is discussed in Section 8.3Limitations.
The blank nodes generated to replacetriple terms should not be confused with thereifiers that are typically associated with thesetriple terms.
Classicizing anRDF dataset consists ofclassicizing itsdefault graph and each of itsnamed graph. In this case, the freshblank node assigned to eachtriple term must not be used in any graph of the dataset.
A detailed algorithm of the transformation is found in Section8.4.1Theclassicize
algorithm.
The examples in this section are expressed in the Turtle concrete syntax [RDF12-TURTLE].
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>PREFIX ex: <http://example.org/><< ex:s ex:p ex:o >> ex:q "some value".
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>PREFIX ex: <http://example.org/>_:r1 rdf:reifies <<( ex:s ex:p ex:o )>>._:r1 ex:q "some value".
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>PREFIX ex: <http://example.org/>_:r1 rdf:reifies _:gen1._:r1 ex:q "some value"._:gen1 a rdf:TripleTerm ; rdf:ttSubject ex:s; rdf:ttPredicate ex:p; rdf:ttObject ex:o.
Reverting aclassicized graph to its original form consists of locating eachasserted triple (b,rdf:type
,rdf:TripleTerm
) that has ablank nodeb as its subject, along with the three associatedasserted triples that have the sameblank nodeb as their subjects, i.e., (b,rdf:ttSubject
,s), (b,rdf:ttPredicate
,p), and (b,rdf:ttObject
,o); removing these four triples from the graph; and replacing all remaining occurrences ofbappearing in the graph with the triple term (s,p,o).
An implementationMUST report an error if, for a givenb, it can not unambiguously determines,p, oro (i.e., if one of the properties ofb —rdf:ttSubject
,rdf:ttPredicate
, orrdf:ttObject
— is missing or duplicated). An implementationMUST also report an error if the input graph contains at the same time atriple term and anasserted triple (b,rdf:type
,rdf:TripleTerm
) whereb is the sameblank node. Note that none of these situations can occur if the input graph was produced by theclassicize transformation.
To revert aclassicizedRDF dataset to its original form, the transformation above is applied to itsdefault graph and to each of itsnamed graphs.
Note that this transformation has no effect on anyRDF graph orRDF dataset that does not use therdf:TripleTerm
type, includingFull graphs or datasets containingtriple terms. This makes this transformationidempotent as intended.
The two transformations above explicitly do not support graphs or datasets containing at the same time atriple term and anasserted triple (b,rdf:type
,rdf:TripleTerm
) whereb is ablank node. This means that theclassicize transformation is notstrictly universal.
This limitation should not be an issue in practice. Therdf:TripleTerm
type is unlikely to be in used in any published graph or dataset, as it was not defined prior to this specification. For this reason, using it would actually have been bad practice. For future graphs and datasets, this type should be considered to be reserved for use within theclassicize transformation, and not used otherwise.
This is one reason why this transformation introduces new vocabulary terms (rdf:TripleTerm
,rdf:ttSubject
,rdf:ttPredicate
,rdf::ttObject
), rather than repurposing the existingreification vocabulary (rdf:Statement
,rdf:subject
,rdf:predicate
,rdf:object
). Unlikerdf:TripleTerm
,rdf:Statement
is known to be found in widely used datasets (e.g.,Uniprot), so reserving its use for theclassicize transformation was not an option.
Another consequence of this restriction is that implementers will need to be aware and careful when merging graphs in an application thatclassicizes graphs or datasets. The concern is that merging aFullRDF graph containing at least onetriple term with aclassicizedRDF graph (which might containblank node instances ofrdf:TripleTerm
) could result in a "hybrid" graph that cannot be transformed to a consistentFull norClassicRDF graph. Therefore, such applications shouldclassicize every graph prior to merging them. Conversely, applications supporting RDFFull should make sure to apply the reverse transformation to any graph that is known or likely to have beenclassicized, to avoid creating such "hybrid" graphs. Since these transformations are designed to beidempotent, there is no harm in applying them more than necessary.
The algorithm expects one input variableGᵢ which is anRDF graph. It returns aClassicRDF graph.
null
.rdf:type
ando isrdf:TripleTerm
, then:"full"
then exit with an error."classic"
."classic"
then exit with an error."full"
.classicize-triple-term
passingo ast andM asMi.This algorithm is responsible for incrementally populating the mappingM and the graphG used internally by theclassicize
algorithm. It receives atriple term as input and processes it recursively (in case its object is itself atriple term). It returns, among other things, theblank node minted to replace thetriple term in the transformedClassicRDF graph.
This algorithm expects two input variables: atriple termt, and a mapMᵢ fromtriple terms toblank nodes. It returns ablank nodeb, a mapMₒ fromtriple terms toblank nodes, and aClassicRDF graphG.
classicize-triple-term
passingo ast andMᵢ.rdf:type
,rdf:TripleTerm
), (b,rdf:ttSubject
,s), (b,rdf:ttPredicate
,p), and (b,rdf:ttObject
,o) inG.Write this algorithm
This section defines additionaldatatypes that RDF implementationsMAY support.
RDF provides for HTML content as a possibleliteral value. This allows markup in literal values. Such content is indicated in anRDF graph using aliteral whosedatatype is set tordf:HTML
.
Therdf:HTML
datatype is defined as follows:
http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML
.DocumentFragment
nodes [DOM]. TwoDocumentFragment
nodesnode andotherNode are considered equal if and only if the DOM methodnode.isEqualNode
(otherNode)
[DOM] returnstrue
.Each member of the lexical space is associated with the result of applying the following algorithm:
domnodes
be the list ofDOM nodes [DOM] that result from applying theHTML fragment parsing algorithm [HTML5] to the input string, without a context element.domfrag
be a DOMDocumentFragment
[DOM] whosechildNodes
attribute is equal todomnodes
domfrag.normalize
()
. Any language annotation (lang="…"
), text directionality annotation (dir="…"
), or XML namespaces (xmlns
) desired in the HTML content must be included explicitly in the HTML literal. Relative URLs in attributes such ashref
do not have a well-defined base URL and are best avoided. RDF applications may use additional equivalence relations, such as that which relates anxsd:string
with anrdf:HTML
literal corresponding to a single text node of the same string.
RDF provides for XML content as a possibleliteral value. Such content is indicated in anRDF graph using aliteral whosedatatype is set tordf:XMLLiteral
.
Therdf:XMLLiteral
datatype is defined as follows:
http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral
.DocumentFragment
nodes [DOM]. TwoDocumentFragment
nodesnode andotherNode are considered equal if and only if the DOM methodnode.isEqualNode
(otherNode)
returnstrue
.Each member of the lexical space is associated with the result of applying the following algorithm:
domfrag
be a DOMDocumentFragment
node [DOM] corresponding to the input string.domfrag.normalize
()
.Any XML namespace declarations (xmlns
), language annotation (xml:lang
) or baseURI declarations (xml:base
) desired in the XML content must be included explicitly in the XML literal. Note that some concrete RDF syntaxes may define mechanisms for inheriting them from the context (e.g.,@parseType="literal"
in RDF/XML [RDF12-XML].
RDF provides for JSON content as a possibleliteral value. This includes allowing markup in literal values. Such content is indicated in anRDF graph as aliteral whosedatatype is set tordf:JSON
.
Therdf:JSON
datatype is defined as follows:
http://www.w3.org/1999/02/22-rdf-syntax-ns#JSON
.true
,false
, andnull
) fromInfra Standard [INFRA] andW3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes [XMLSCHEMA11-2].The value space ofmaps andlists does not include values having themselves as members, which cannot be represented in JSON.
Two values (a andb) are considered equal if any of the following are true:
{ "a": 1, "b": 2 } and { "b": 2, "a": 1 }
are considered equal. As a result of the value space being defined using terminology from [INFRA], property values which can contain more than one item, such aslists andmaps, are explicitly ordered. All list-like value structures in [INFRA] are ordered, whether or not that order is significant. For the purposes of this specification, unless otherwise stated,map ordering is not important and implementations are not expected to produce or consume deterministically ordered values.true
,false
, andnull
).+INF
or-INF
. Such values cannot be represented as JSON Numbers, limiting the ability to serialize such values back to JSON.true
,false
, andnull
values to [INFRA]true
,false
, andnull
values, respectively.The issue refers to the use ofordered map from [INFRA] for describing the value space ofJSON Objects and suggests defining a new datatype for unordered maps.
This section is non-normative.
RDF is used to express arbitrary application data, which may include the expression of personally identifiable information (PII) or other information which could be considered sensitive. Authors publishing such information are advised to carefully consider the needs and use of publishing such information, as well as the applicable regulations for the regions where the data is expected to be consumed and potentially revealed (e.g.,GDPR,CCPA,others), particularly whether authorization measures are needed for access to the data.
This section is non-normative.
The RDF Abstract Syntax is not used directly for conveying information, although concrete serialization forms are specifically intended to do so.
ApplicationsMAY evaluate given data to infer more assertions or to dereferenceIRIs, invoking the security considerations of the scheme for thatIRI. Note in particular, the privacy issues in [RFC3023] section 10 for HTTP IRIs. Data obtained from an inaccurate or malicious data source may lead to inaccurate or misleading conclusions, as well as the dereferencing of unintended IRIs. Care must be taken to align the trust in consulted resources with the sensitivity of the intended use of the data; inferences of potential medical treatments would likely require different trust than inferences for trip planning.
RDF is used to express arbitrary application data; security considerations will vary by domain of use. Security tools and protocols applicable to text (for example, PGP encryption, checksum validation, password-protected compression) may also be used on RDF documents. Security/privacy protocols must be imposed which reflect the sensitivity of the embedded information.
RDF can express data which is presented to the user, such as RDF Schema labels. Applications renderingstrings retrieved from untrusted RDF documents, or using unescaped characters,SHOULD use warnings and other appropriate means to limit the possibility that malignant strings might be used to mislead the reader. The security considerations in the media type registration for XML ([RFC3023] section 10) provide additional guidance around the expression of arbitrary data and markup.
RDF usesIRIs as term identifiers. Applications interpreting data expressed in RDFSHOULD address the security issues ofInternationalized Resource Identifiers (IRIs) [RFC3987] Section 8, as well asUniform Resource Identifier (URI): Generic Syntax [RFC3986] Section 7.
MultipleIRIs may have the same appearance. Characters in different scripts may look similar (for instance, a Cyrillic "о" may appear similar to a Latin "o"). A character followed by combining characters may have the same visual representation as another character (for example, LATIN SMALL LETTER "E" followed by COMBINING ACUTE ACCENT has the same visual representation as LATIN SMALL LETTER "E" WITH ACUTE). Any person or application that is writing or interpreting data in RDF must take care to use theIRI that matches the intended semantics, and avoid IRIs that may look similar. Further information about matching visually similar characters can be found inUnicode Security Considerations [UNICODE-SECURITY] andInternationalized Resource Identifiers (IRIs) [RFC3987] Section 8.
These considerations are a more generic form of Security Considerations for [RDF12-TURTLE], [RDF12-TRIG], [RDF12-N-TRIPLES], and [RDF12-N-QUADS].
This section is non-normative.
Unicode [UNICODE] provides a mechanism for signaling direction within a string (seeUnicode Bidirectional Algorithm [I18N-Glossary]). RDF provides a mechanism for specifying thebase direction of adirectional language-tagged string to signal the initial text direction of a string. For most human language strings, but particularly for those whose base direction cannot be accurately determined from the string content, is it valuable to have an external indicator in order to get the proper display and isolation of the value. One example of such an indicator is the [HTML]dir attribute; see [STRING-META].
JSON-LD 1.1 [JSON-LD11] introduced thei18n namespace to use a datatype to specify both the base direction anlanguage tag of anRDF literal.
This section is non-normative.
The following [ABNF] grammar applies the changes from [RFC3987] and [RFC6874] to the sectionCollected ABNF forURI of [RFC3986] to give a consolidated grammar for IRIs.
This is provided for convenience only. If it differs from definitions in [RFC3986], [RFC3987], or any subsequent updates, then those definitions should be used.
IRI= scheme":" ihier-part ["?" iquery ] ["#" ifragment ]ihier-part="//" iauthority ipath-abempty / ipath-absolute / ipath-rootless / ipath-emptyIRI-reference= IRI / irelative-refabsolute-IRI= scheme":" ihier-part ["?" iquery ]irelative-ref= irelative-part ["?" iquery ] ["#" ifragment ]irelative-part="//" iauthority ipath-abempty / ipath-absolute / ipath-noscheme / ipath-emptyscheme=ALPHA *(ALPHA /DIGIT /"+" /"-" /"." )iauthority= [ iuserinfo"@" ] ihost [":" port ]iuserinfo= *( iunreserved / pct-encoded / sub-delims /":" )ihost= IP-literal / IPv4address / ireg-nameport= *DIGITIP-literal="[" ( IPv6address / IPv6addrz / IPvFuture )"]"ZoneID=1*( unreserved / pct-encoded )IPv6addrz= IPv6address"%25" ZoneIDIPvFuture="v"1*HEXDIG"."1*( unreserved / sub-delims /":" )IPv6address=6( h16":" ) ls32 /"::"5( h16":" ) ls32 / [ h16 ]"::"4( h16":" ) ls32 / [ *1( h16":" ) h16 ]"::"3( h16":" ) ls32 / [ *2( h16":" ) h16 ]"::"2( h16":" ) ls32 / [ *3( h16":" ) h16 ]"::" h16":" ls32 / [ *4( h16":" ) h16 ]"::" ls32 / [ *5( h16":" ) h16 ]"::" h16 / [ *6( h16":" ) h16 ]"::"h16=1*4HEXDIGls32= ( h16":" h16 ) / IPv4addressIPv4address= dec-octet"." dec-octet"." dec-octet"." dec-octetdec-octet=DIGIT; 0-9 /%x31-39DIGIT; 10-99 /"1"2DIGIT; 100-199 /"2"%x30-34DIGIT; 200-249 /"25"%x30-35; 250-255ireg-name= *( iunreserved / pct-encoded / sub-delims )ipath= ipath-abempty; begins with "/" or is empty / ipath-absolute; begins with "/" but not "//" / ipath-noscheme; begins with a non-colon segment / ipath-rootless; begins with a segment / ipath-empty; zero charactersipath-abempty= *("/" isegment )ipath-absolute="/" [ isegment-nz *("/" isegment ) ]ipath-noscheme= isegment-nz-nc *("/" isegment )ipath-rootless= isegment-nz *("/" isegment )ipath-empty=0isegment= *ipcharisegment-nz=1*ipcharisegment-nz-nc=1*( iunreserved / pct-encoded / sub-delims /"@" ); non-zero-length segment without any colon ":"ipchar= iunreserved / pct-encoded / sub-delims /":" /"@"iquery= *( ipchar / iprivate /"/" /"?" )ifragment= *( ipchar /"/" /"?" )iunreserved=ALPHA /DIGIT /"-" /"." /"_" /"~" / ucscharucschar=%xA0-D7FF /%xF900-FDCF /%xFDF0-FFEF /%x10000-1FFFD /%x20000-2FFFD /%x30000-3FFFD /%x40000-4FFFD /%x50000-5FFFD /%x60000-6FFFD /%x70000-7FFFD /%x80000-8FFFD /%x90000-9FFFD /%xA0000-AFFFD /%xB0000-BFFFD /%xC0000-CFFFD /%xD0000-DFFFD /%xE1000-EFFFDiprivate=%xE000-F8FF /%xF0000-FFFFD /%x100000-10FFFDpct-encoded="%"HEXDIGHEXDIGunreserved=ALPHA /DIGIT /"-" /"." /"_" /"~"reserved= gen-delims / sub-delimsgen-delims=":" /"/" /"?" /"#" /"[" /"]" /"@"sub-delims="!" /"$" /"&" /"'" /"(" /")" /"*" /"+" /"," /";" /"="
The ABNF can also be accessed directly fromiri-grammar.abnf.
This section is non-normative.
This section is non-normative.
The editors of the original version of the spec were Graham Klyne (Nine by Nine) and Jeremy J. Carroll (Hewlett Packard Labs).
This document contains a significant contribution from Pat Hayes, Sergey Melnik and Patrick Stickler, under whose leadership was developed the framework described in the RDF family of specifications for representing datatyped values, such as integers and dates.
The editors acknowledge valuable contributions from the following: Frank Manola, Pat Hayes, Dan Brickley, Jos de Roo, Dave Beckett, Patrick Stickler, Peter F. Patel-Schneider, Jerome Euzenat, Massimo Marchiori, Tim Berners-Lee, Dave Reynolds and Dan Connolly.
Jeremy Carroll thanks Oreste Signore, his host at theW3C Office in Italy and Istituto di Scienza e Tecnologie dell'Informazione "Alessandro Faedo", part of the Consiglio Nazionale delle Ricerche, where Jeremy is a visiting researcher.
This document is a product of extended deliberations by the RDFcore Working Group, whose members have included: Art Barstow (W3C), Dave Beckett (ILRT), Dan Brickley (ILRT), Dan Connolly (W3C), Jeremy Carroll (Hewlett Packard), Ron Daniel (Interwoven Inc), Bill dehOra (InterX), Jos De Roo (AGFA), Jan Grant (ILRT), Graham Klyne (Nine by Nine), Frank Manola (MITRE Corporation), Brian McBride (Hewlett Packard), Eric Miller (W3C), Stephen Petschulat (IBM), Patrick Stickler (Nokia), Aaron Swartz (HWG), Mike Dean (BBN Technologies / Verizon), R. V. Guha (Alpiri Inc), Pat Hayes (IHMC), Sergey Melnik (Stanford University) and Martyn Horner (Profium Ltd).
This specification also draws upon an earlier RDF Model and Syntax document edited by Ora Lassilla and Ralph Swick, and RDF Schema edited by Dan Brickley and R. V. Guha. RDF and RDF Schema Working Group members who contributed to this earlier work are: Nick Arnett (Verity), Tim Berners-Lee (W3C), Tim Bray (Textuality), Dan Brickley (ILRT / University of Bristol), Walter Chang (Adobe), Sailesh Chutani (Oracle), Dan Connolly (W3C), Ron Daniel (DATAFUSION), Charles Frankston (Microsoft), Patrick Gannon (CommerceNet), R. V. Guha (Epinions, previously of Netscape Communications), Tom Hill (Apple Computer), Arthur van Hoff (Marimba), Renato Iannella (DSTC), Sandeep Jain (Oracle), Kevin Jones, (InterMind), Emiko Kezuka (Digital Vision Laboratories), Joe Lapp (webMethods Inc.), Ora Lassila (Nokia Research Center), Andrew Layman (Microsoft), Ralph LeVan (OCLC), John McCarthy (Lawrence Berkeley National Laboratory), Chris McConnell (Microsoft), Murray Maloney (Grif), Michael Mealling (Network Solutions), Norbert Mikula (DataChannel), Eric Miller (OCLC), Jim Miller (W3C, emeritus), Frank Olken (Lawrence Berkeley National Laboratory), Jean Paoli (Microsoft), Sri Raghavan (Digital/Compaq), Lisa Rein (webMethods Inc.), Paul Resnick (University of Michigan), Bill Roberts (KnowledgeCite), i Tsuyoshi Sakata (Digital Vision Laboratories), Bob Schloss (IBM), Leon Shklar (Pencom Web Works), David Singer (IBM), Wei (William) Song (SISU), Neel Sundaresan (IBM), Ralph Swick (W3C), Naohiko Uramoto (IBM), Charles Wicksteed (Reuters Ltd.), Misha Wolf (Reuters Ltd.) and Lauren Wood (SoftQuad).
This section is non-normative.
The editors of the RDF 1.1 version of the spec were Richard Cyganiak (DERI), David Wood (3 Round Stones), and Markus Lanthaler (Graz University of Technology).
The editors acknowledge valuable contributions from Thomas Baker, Tim Berners-Lee, David Booth, Dan Brickley, Gavin Carothers, Jeremy Carroll, Pierre-Antoine Champin, Dan Connolly, John Cowan, Martin J. Dürst, Alex Hall, Steve Harris, Sandro Hawke, Pat Hayes, Ivan Herman, Peter F. Patel-Schneider, Addison Phillips, Eric Prud'hommeaux, Nathan Rixham, Andy Seaborne, Leif Halvard Silli, Guus Schreiber, Dominik Tomaszuk, and Antoine Zimmermann.
The membership of the RDF Working Group included Thomas Baker, Scott Bauer, Dan Brickley, Gavin Carothers, Pierre-Antoine Champin, Olivier Corby, Richard Cyganiak, Souripriya Das, Ian Davis, Lee Feigenbaum, Fabien Gandon, Charles Greer, Alex Hall, Steve Harris, Sandro Hawke, Pat Hayes, Ivan Herman, Nicholas Humfrey, Kingsley Idehen, Gregg Kellogg, Markus Lanthaler, Arnaud Le Hors, Peter F. Patel-Schneider, Eric Prud'hommeaux, Yves Raimond, Nathan Rixham, Guus Schreiber, Andy Seaborne, Manu Sporny, Thomas Steiner, Ted Thibodeau, Mischa Tuffield, William Waites, Jan Wielemaker, David Wood, Zhe Wu, and Antoine Zimmermann.
This section is non-normative.
In addition to the editors, the following people have contributed to this specification:Denis Ah-Kang, Dominik Tomaszuk, Niklas Lindström, Peter F. Patel-Schneider, Sarven Capadisli, Ted Thibodeau Jr, and Thomas Tanon
Members of the RDF-star Working Group Group included Vladimir Alexiev, Amin Anjomshoaa, Julián Arenas-Guerrero, Dörthe Arndt, Bilal Ben Mahria, Erich Bremer, Kurt Cagle, Rémi Ceres,Pierre-Antoine Champin, Souripriya Das, Daniil Dobriy, Enrico Franconi, Jeffrey Phillips Freeman, Fabien Gandon, Benjamin Goering, Adrian Gschwend, Olaf Hartig, Timothée Haudebourg, Ian Horrocks, Gregg Kellogg, Mark Kim, Jose Emilio Labra Gayo, Ora Lassila, Richard Lea, Niklas Lindström, Pasquale Lisena, Thomas Lörtsch, Matthew Nguyen, Peter Patel-Schneider, Thomas Pellissier Tanon, Dave Raggett, Jean-Yves ROSSI, Felix Sasaki, Andy Seaborne, Ruben Taelman, Ted Thibodeau Jr, Dominik Tomaszuk, Raphaël Troncy, William Van Woensel, Gregory Williams, Jesse Wright, Achille Zappa, and Antoine Zimmermann.
Recognize members of the Task Force? Not an easy to find list of contributors.
This section is non-normative.
rdf:HTML
andrdf:XMLLiteral
datatypes normative.rdf:HTML
andrdf:XMLLiteral
datatypes to this appendix.rdf:JSON
datatype, the definition of which is adopted fromSection 10.2 Therdf:JSON
Datatype in [JSON-LD11]. Note that thevalue space defined here updates thevalue space of therdf:JSON
datatype defined inJSON-LD 1.1 [JSON-LD11]rdf:XMLLiteral
datatype.A detailed overview of the differences between RDF versions 1.1 and 1.2 can be found inWhat’s New in RDF 1.2 [RDF12-NEW].
rdf:HTML
§A.1rdf:JSON
§A.3rdf:XMLLiteral
§A.2isEqualNode(otherNode)
(forNode
)normalize()
(forNode
)Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in: