Typed and language-tagged literals

Numbers, dates, multilingual strings.

0/3 done

Theory

Literals can carry a datatype or a language tag:

:Alice :age 30 .                # xsd:integer (inferred)
:Alice :height "1.72"^^xsd:decimal .
:Alice foaf:name "Alice"@en, "アリス"@ja .

The XSD datatypes you'll meet most often:

DatatypeExample literalNotes
xsd:string"hello"Default for bare strings
xsd:integer42Inferred from bare integers
xsd:decimal"1.72"^^xsd:decimalUse for exact decimals
xsd:booleantruetrue / false keywords
xsd:date"1990-04-12"^^xsd:dateISO-8601 calendar date
xsd:dateTime"2025-05-18T10:30:00Z"^^xsd:dateTimeDate + time + timezone

Reading in progress · 0 of 3 activities done