RDF/POST is a compact syntax for serialising an RDF graph inside a classic HTML application/x-www-form-urlencoded
payload, so it works with any browser’s GET or POST mechanisms—no JavaScript required.
- Plain‑HTML forms – build RDF edit and create interfaces with ordinary
<form>
elements—no JavaScript required. - Language‑agnostic – piggybacks on the ubiquitous
application/x-www-form-urlencoded
encoding that every web framework already understands. - Streaming‑friendly – triples arrive in a simple key/value stream, so parsers can handle very large graphs with constant memory.
Part | Key(s) | Meaning |
---|---|---|
rdf= |
(first pair) | marks the start of an RDF/POST body |
&v= |
default namespace IRI | |
&n=…&v= |
extra namespace prefix + IRI | |
Subject | &sb= blank ‖ &su= full IRI ‖ &sv= suffix ‖ &sn=…&sv= prefixed suffix |
|
Predicate | &pv= suffix ‖ &pn=…&pv= prefixed suffix ‖ &pu= full IRI |
|
Object | &ob= blank ‖ &ou= full IRI ‖ &ov= suffix ‖ &on=…&ov= prefixed suffix ‖ &ol= literal (plus optional <= datatype | &ll= lang) |
(See the specification for the full EBNF grammar.)
<form action="/post" method="post">
<!-- start -->
<input type="hidden" name="rdf" value="">
<!-- namespaces -->
<input type="hidden" name="v" value="http://xmlns.com/foaf/0.1/">
<input type="hidden" name="n" value="dc">
<input type="hidden" name="v" value="http://purl.org/dc/elements/1.1/">
<!-- triples -->
<input type="hidden" name="sb" value="o">
<input type="hidden" name="pv" value="givenName">
<input type="text" name="ol" value="Ora">
…
</form>
When submitted, the browser sends a single line such as
rdf=&v=http://xmlns.com/foaf/0.1/&n=dc&v=http://purl.org/dc/elements/1.1/&sb=o&pv=givenName&ol=Ora …
which is equivalent to the Turtle below:
_:o foaf:givenName "Ora" ;
dc:creator _:b .
- Default:
application/x-www-form-urlencoded
- RDF‑specific (proposed):
application/rdf+x-www-form-urlencoded
- Recommended extension:
.rpo
- RDFPostReader – streaming parser for Apache Jena (AtomGraph Core)
Specification by Sergei Egorov, maintained by AtomGraph.