Graph
Literal

🔤Literal

NEW

An RDF value node representing concrete data, typed or language-tagged.

DESCRIPTION

Literals represent values such as strings, numbers, dates, and booleans. They consist of a lexical form plus either a datatype IRI or a language tag for plain strings. XML Schema datatypes (e.g., xsd:string, xsd:int, xsd:dateTime) commonly define literal types. Language-tagged strings capture natural language text for multilingual data. Choosing appropriate datatypes aids validation, reasoning, and efficient querying. Serializations like Turtle, RDF/XML, and JSON-LD provide explicit literal syntax.

ALTERNATIVE DEFINITIONS

W3C RDF 1.1 Concepts and Abstract Syntax

A literal is a value such as a string, a number, or a date.

Concise emphasis on values represented by literals.

Source

Apache Jena

Literals are values, such as strings and numbers, with optional datatypes or language tags.

Highlights datatype and language tag features in practice.

Source

Eclipse RDF4J

Literals represent concrete data values, such as strings, integers and dates.

Stresses common primitive types in the model API.

Source

RDF Datatype IRI XML Schema datatypes Language Tag Turtle JSON-LD SPARQL RDF Schema OWL

COMPETING TERMS

IRI Blank Node

KNOWLEDGE AREAS

Semantic & Knowledge Modeling Data Modeling Data Integration & Interoperability

TARGET AUDIENCE

Data Modeler Data Engineer Software Developer Data Architect BI Specialist AI Engineer

EXTERNAL SOURCES

  • Wikipedia - Resource Description Framework
  • W3C - Normative definition of literals
  • W3C - XML Schema datatypes reference
  • Apache Jena - Developer guidance on literals
  • W3C - Literal syntax in Turtle

TOP QUESTIONS

What is a Literal in RDF?

A Literal is a concrete value, like a string or number, optionally typed with a datatype IRI or tagged with a language.

Category: Definition

Why do datatypes matter for RDF Literals?

Datatypes enable validation, reasoning, and correct comparison and sorting of values in queries and applications.

Category: Importance

How are language-tagged Literals used?

Language tags support multilingual texts, enabling content negotiation and locale-aware presentation.

Category: Usage

What is a common mistake with RDF Literals?

Using strings for numeric values breaks numeric comparison; choose appropriate xsd datatypes.

Category: Mistakes

How are Literals represented in Turtle?

Quoted strings with optional @lang or ^^datatype IRIs, and bare numbers for common numeric types.

Category: Syntax

Can Literals be subjects of RDF triples?

No, Literals can only appear as objects; subjects must be IRIs or blank nodes.

Category: Constraints

How does JSON-LD handle Literals?

JSON-LD uses native JSON types and explicit @type or @language for datatyped and language-tagged values.

Category: Integration

How do RDF Literals compare to IRIs?

IRIs identify resources globally, while Literals represent concrete values without identity.

Category: Comparison

Which tools validate RDF Literal datatypes?

SHACL engines, OWL reasoners, and libraries like Jena/RDF4J validate and enforce datatypes.

Category: Tooling