diff options
author | David Robillard <d@drobilla.net> | 2021-08-12 22:33:47 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-01-28 21:57:07 -0500 |
commit | 196db2ef0cd44c3fb542b86be7929bd01d83e138 (patch) | |
tree | 97ad345394e394c0d42b43fcf3d464794f719ccb /test/sort/GPSO.nq | |
parent | fdf837b4b3baffc65e429c2e6ecc2e764bfed0ac (diff) | |
download | serd-196db2ef0cd44c3fb542b86be7929bd01d83e138.tar.gz serd-196db2ef0cd44c3fb542b86be7929bd01d83e138.tar.bz2 serd-196db2ef0cd44c3fb542b86be7929bd01d83e138.zip |
Put rdf:type properties first when pretty-printing
This is a common convention in Turtle and TriG because the special "a" syntax
for rdf type as the first property looks nice, makes things easier to read, and
can be useful for streaming implementations because the type of the instance is
known before reading its properties.
Also significantly clean up the pretty-printing implementation in the process.
Diffstat (limited to 'test/sort/GPSO.nq')
-rw-r--r-- | test/sort/GPSO.nq | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/sort/GPSO.nq b/test/sort/GPSO.nq index 1a858017..67e13aa7 100644 --- a/test/sort/GPSO.nq +++ b/test/sort/GPSO.nq @@ -7,4 +7,7 @@ _:b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1"^^<http://www.w3.org/ _:b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/graph1> . _:b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b3 <http://example.org/graph1> . _:b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.org/graph1> . +<http://example.org/s> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/Subject> <http://example.org/graph1> . +_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/Anonymous> <http://example.org/graph1> . <http://example.org/a> <http://example.org/b> <http://example.org/c> <http://example.org/graph2> . +<http://example.org/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/OtherSubject> <http://example.org/graph2> . |