#1161: WG New Spec: RDF 1.2 N-Triples

Visit on Github

Opened Oct 21, 2025

Specification

https://www.w3.org/TR/rdf12-n-triples/

Explainer

https://www.w3.org/TR/rdf12-primer/

Links

  • The WG's request for this TAG review: https:// <!-- Usually a deep link into minutes or an email thread. -->
  • Previous early design review, if any: https://github.com/w3ctag/design-reviews/issues/####
  • An introduction to the feature, aimed at unfamiliar audiences: Compared to RDF 1.1, the three main new features in RDF 1.2 are
    • triple-terms, that allow to make statements about other RDF statements (asserted or not) in a better way than the old-style reification
    • the ability to attach a base direction on language tagged strings, which complies with i18n good practices
    • a way to declare which version of RDF is used in RDF concrete syntaxes
  • A description of the problems that end-users were facing before this proposal:
  • Alternatives considered:
  • Examples of how to use the proposal to solve the end-users' problems: see explainer
  • What do the end-users experience with this proposal: since RDF's "end-users" are developers and information architect, the notion of "user experience" does not quite apply
  • User research you did to validate the problem and/or design, if any: none by the WG (but triple-terms have long been studied by the academic community as RDF* / RDF-star)
  • Web Platform Tests: N/A

The specification

Where and by whom is the work is being done?

  • GitHub repo: https://github.com/w3c/rdf-n-triples
  • Primary contacts:
    • Dominik Tomaszuk (@domel), Invited Expert, Editor
    • Adrian Gschwend (@ktk), Zazuko, Chair
    • Ora Lassila (@rdfguy), Amazon, Chair
    • Pierre-Antoine Champin (@pchampin), W3C / Inria, Staff Contact
  • Organization/project driving the specification: none
  • This work is being funded by: none
  • Primary standards group developing this feature: RDF & SPARQL WG
  • Incubation and standards groups that have discussed the design:

Feedback so far

You should also know that...

No response

<!-- Content below this is maintained by @w3c-tag-bot -->

Track conversations at https://tag-github-bot.w3.org/gh/w3ctag/design-reviews/1161

Discussions

Log in to see TAG-private discussions.

Discussed Oct 27, 2025 (See Github)

Sarven isn't here.

Discussed Dec 1, 2025 (See Github)

(Sarven isn't here today)

Discussed Dec 8, 2025 (See Github)

Skipped

Comment by @csarven Dec 18, 2025 (See Github)

The TAG thanks the RDF & SPARQL WG for requesting this review and for the detailed discussion.

The TAG recommends the following:

The line based plain text format of RDF 1.1 N-Triples made it possible to concatenate multiple files using simple tools. Aside from encoding N-Triples data in Turtle documents, as indicated by file extension or media type, the line based characteristic, which is the defining feature of N-Triples, appears to be weakened by the introduction of version declarations in the content. If concatenation of multiple N-Triples documents remains an important affordance of the format, the specification should note this change more clearly and define the expected parsing behaviour. The N-Triples specification, and potentially other concrete RDF syntaxes that introduce in content version declarations, should also clarify how multiple version declarations within a single document are to be interpreted.

We suggest clarifying the behaviour when mixing N-Triples data that declares different versions, e.g., 1.2, 1.2-basic, and 1.1.

As currently specified, these changes appear to add complexity to the format. We encourage addressing concerns around version announcement at a higher level, such as in RDF 1.2 Concepts and Abstract Data Model. A related TAG review can be found at https://github.com/w3ctag/design-reviews/issues/1159#issuecomment-3671161845

The IANA version parameter registration for the N-Triples media type should avoid normative language that uses requirement levels (as the ones defined in RFC 2119, RFC 8174), as noted in https://github.com/w3c/rdf-n-triples/issues/84 . This concern similarly applies to other parameters and to updates to media types of other concrete RDF syntaxes.

This review reflects the TAG's current assessment and is intended to support the Working Group's next steps. We are happy to discuss further if clarification is needed.

Comment by @pchampin Dec 19, 2025 (See Github)

Thanks for this review.

Re. concatenation: concatenating two N-Triples files results in a compliant N-Triples file. This was the case in RDF 1.1 and is still the case in RDF 1.2. Note however that such concatenation was never without risk: identical blank node labels in the files being concatenated will result in (possibly) unintended merging of blank nodes. So yes, concatenating an N-Triples 1.1 file with an N-Triples 1.2 file "contaminates" the first one with 1.2 features, and this should only be done after careful consideration. But careful consideration was already required before concatenating N-Triples 1.1 files with each other (because of blank nodes).

We suggest clarifying the behaviour when mixing N-Triples data that declares different versions, e.g., 1.2, 1.2-basic, and 1.1.

Good point, see w3c/rdf-turtle#118

We will also address https://github.com/w3ctag/design-reviews/issues/1159#issuecomment-3671161845 and w3c/rdf-n-triples#84 .

Comment by @csarven Dec 19, 2025 (See Github)

Thanks for following up.

The specific concatenation scenario about when multiple version declarations are included was about the grammar rather than contamination, noting (with fresh eyes) that https://www.w3.org/TR/rdf12-n-triples/#sec-grammar-grammar indeed permits multiple directives in a given document. The referenced issues will help clarify. I mentioned one additional case to consider at https://github.com/w3c/rdf-turtle/issues/118#issuecomment-3674111046 - when a triple does not precede with a version directive.