Skip to content

Instantly share code, notes, and snippets.

@RubenVerborgh
Created August 27, 2015 11:49
Show Gist options
  • Save RubenVerborgh/eb3717bb78df42369b0f to your computer and use it in GitHub Desktop.
Save RubenVerborgh/eb3717bb78df42369b0f to your computer and use it in GitHub Desktop.
IRI resolution of different Turtle parsers
A. Resolving without leading ./ or ../
BASE http://example.org/xxx/yyy/zzz, resolving aaa/bbb/ccc
EYE http://example.org/xxx/yyy/aaa/bbb/ccc
cwm http://example.org/xxx/yyy/aaa/bbb/ccc
N3.js http://example.org/xxx/yyy/aaa/bbb/ccc
Serd http://example.org/xxx/yyy/aaa/bbb/ccc
B. Resolving with non-leading ./ or ../
BASE http://example.org/xxx/yyy/zzz, resolving aaa/./bbb/ccc
EYE http://example.org/xxx/yyy/aaa/./bbb/ccc
cwm http://example.org/xxx/yyy/aaa/./bbb/ccc
N3.js http://example.org/xxx/yyy/aaa/./bbb/ccc
Serd http://example.org/xxx/yyy/aaa/./bbb/ccc
BASE http://example.org/xxx/yyy/zzz, resolving aaa/bbb/./ccc
EYE http://example.org/xxx/yyy/aaa/bbb/./ccc
cwm http://example.org/xxx/yyy/aaa/bbb/./ccc
N3.js http://example.org/xxx/yyy/aaa/bbb/./ccc
Serd http://example.org/xxx/yyy/aaa/bbb/./ccc
BASE http://example.org/xxx/yyy/zzz, resolving aaa/../bbb/ccc
EYE http://example.org/xxx/yyy/aaa/../bbb/ccc
cwm http://example.org/xxx/yyy/aaa/../bbb/ccc
N3.js http://example.org/xxx/yyy/aaa/../bbb/ccc
Serd http://example.org/xxx/yyy/aaa/../bbb/ccc
BASE http://example.org/xxx/yyy/zzz, resolving aaa/bbb/../ccc
EYE http://example.org/xxx/yyy/aaa/bbb/../ccc
cwm http://example.org/xxx/yyy/aaa/bbb/../ccc
N3.js http://example.org/xxx/yyy/aaa/bbb/../ccc
Serd http://example.org/xxx/yyy/aaa/bbb/../ccc
C. Resolving with leading sequences of ./
BASE http://example.org/xxx/yyy/zzz, resolving ./aaa/bbb/ccc
EYE http://example.org/xxx/yyy/aaa/bbb/ccc
cwm http://example.org/xxx/yyy/aaa/bbb/ccc
N3.js http://example.org/xxx/yyy/aaa/bbb/ccc
Serd http://example.org/xxx/yyy/aaa/bbb/ccc
BASE http://example.org/xxx/yyy/zzz, resolving ././aaa/bbb/ccc
EYE http://example.org/xxx/yyy/aaa/bbb/ccc
cwm http://example.org/xxx/yyy/./aaa/bbb/ccc
N3.js http://example.org/xxx/yyy/aaa/bbb/ccc
Serd http://example.org/xxx/yyy/aaa/bbb/ccc
BASE http://example.org/xxx/yyy/zzz, resolving ./././aaa/bbb/ccc
EYE http://example.org/xxx/yyy/aaa/bbb/ccc
cwm http://example.org/xxx/yyy/././aaa/bbb/ccc
N3.js http://example.org/xxx/yyy/aaa/bbb/ccc
Serd http://example.org/xxx/yyy/aaa/bbb/ccc
BASE http://example.org/xxx/yyy/zzz, resolving ././././././aaa/bbb/ccc
EYE http://example.org/xxx/yyy/aaa/bbb/ccc
cwm http://example.org/xxx/yyy/./././././aaa/bbb/ccc
N3.js http://example.org/xxx/yyy/aaa/bbb/ccc
Serd http://example.org/xxx/yyy/aaa/bbb/ccc
D. Resolving with leading sequences of ../
BASE http://example.org/xxx/yyy/zzz, resolving ../aaa/bbb/ccc
EYE http://example.org/xxx/aaa/bbb/ccc
cwm http://example.org/xxx/aaa/bbb/ccc
N3.js http://example.org/xxx/aaa/bbb/ccc
Serd http://example.org/xxx/aaa/bbb/ccc
BASE http://example.org/xxx/yyy/zzz, resolving ../../aaa/bbb/ccc
EYE http://example.org/aaa/bbb/ccc
cwm http://example.org/aaa/bbb/ccc
N3.js http://example.org/aaa/bbb/ccc
Serd http://example.org/aaa/bbb/ccc
BASE http://example.org/xxx/yyy/zzz, resolving ../../../aaa/bbb/ccc
EYE http://example.org/aaa/bbb/ccc
cwm http://example.org/aaa/bbb/ccc
N3.js http://example.org/aaa/bbb/ccc
Serd http://example.org/aaa/bbb/ccc
BASE http://example.org/xxx/yyy/zzz, resolving ../../../../../../aaa/bbb/ccc
EYE invalid_document(after_line(1))
cwm http://example.org/aaa/bbb/ccc
N3.js http://example.org/aaa/bbb/ccc
Serd http://example.org/aaa/bbb/ccc
E. Resolving with leading mixed sequences of ./ and ../
BASE http://example.org/xxx/yyy/zzz, resolving ./../aaa/bbb/ccc
EYE http://example.org/xxx/aaa/bbb/ccc
cwm http://example.org/xxx/aaa/bbb/ccc
N3.js http://example.org/xxx/aaa/bbb/ccc
Serd http://example.org/xxx/aaa/bbb/ccc
BASE http://example.org/xxx/yyy/zzz, resolving .././aaa/bbb/ccc
EYE http://example.org/xxx/aaa/bbb/ccc
cwm http://example.org/xxx/aaa/bbb/ccc
N3.js http://example.org/xxx/aaa/bbb/ccc
Serd http://example.org/xxx/aaa/bbb/ccc
BASE http://example.org/xxx/yyy/zzz, resolving ./.././aaa/bbb/ccc
EYE http://example.org/xxx/aaa/bbb/ccc
cwm http://example.org/xxx/aaa/bbb/ccc
N3.js http://example.org/xxx/aaa/bbb/ccc
Serd http://example.org/xxx/aaa/bbb/ccc
BASE http://example.org/xxx/yyy/zzz, resolving ../././aaa/bbb/ccc
EYE http://example.org/xxx/aaa/bbb/ccc
cwm http://example.org/xxx/./aaa/bbb/ccc
N3.js http://example.org/xxx/aaa/bbb/ccc
Serd http://example.org/xxx/aaa/bbb/ccc
BASE http://example.org/xxx/yyy/zzz, resolving ./.././../aaa/bbb/ccc
EYE http://example.org/aaa/bbb/ccc
cwm http://example.org/aaa/bbb/ccc
N3.js http://example.org/aaa/bbb/ccc
Serd http://example.org/aaa/bbb/ccc
BASE http://example.org/xxx/yyy/zzz, resolving .././.././aaa/bbb/ccc
EYE http://example.org/aaa/bbb/ccc
cwm http://example.org/aaa/bbb/ccc
N3.js http://example.org/aaa/bbb/ccc
Serd http://example.org/aaa/bbb/ccc
BASE http://example.org/xxx/yyy/zzz, resolving ./.././.././../aaa/bbb/ccc
EYE http://example.org/aaa/bbb/ccc
cwm http://example.org/aaa/bbb/ccc
N3.js http://example.org/aaa/bbb/ccc
Serd http://example.org/aaa/bbb/ccc
BASE http://example.org/xxx/yyy/zzz, resolving .././.././.././aaa/bbb/ccc
EYE http://example.org/aaa/bbb/ccc
cwm http://example.org/aaa/bbb/ccc
N3.js http://example.org/aaa/bbb/ccc
Serd http://example.org/aaa/bbb/ccc
BASE http://example.org/xxx/yyy/zzz, resolving ./.././.././.././../aaa/bbb/ccc
EYE invalid_document(after_line(1))
cwm http://example.org/aaa/bbb/ccc
N3.js http://example.org/aaa/bbb/ccc
Serd http://example.org/aaa/bbb/ccc
BASE http://example.org/xxx/yyy/zzz, resolving .././.././.././.././aaa/bbb/ccc
EYE invalid_document(after_line(1))
cwm http://example.org/aaa/bbb/ccc
N3.js http://example.org/aaa/bbb/ccc
Serd http://example.org/aaa/bbb/ccc
F. Resolving with leading mixed sequences of ./ and ../, where ./ always occurs in pairs
BASE http://example.org/xxx/yyy/zzz, resolving ../././../aaa/bbb/ccc
EYE http://example.org/aaa/bbb/ccc
cwm http://example.org/xxx/./../aaa/bbb/ccc
N3.js http://example.org/aaa/bbb/ccc
Serd http://example.org/aaa/bbb/ccc
BASE http://example.org/xxx/yyy/zzz, resolving ../././../././../aaa/bbb/ccc
EYE http://example.org/aaa/bbb/ccc
cwm http://example.org/xxx/./../././../aaa/bbb/ccc
N3.js http://example.org/aaa/bbb/ccc
Serd http://example.org/aaa/bbb/ccc
BASE http://example.org/xxx/yyy/zzz, resolving ../././../././../././../aaa/bbb/ccc
EYE invalid_document(after_line(1))
cwm http://example.org/xxx/./../././../././../aaa/bbb/ccc
N3.js http://example.org/aaa/bbb/ccc
Serd http://example.org/aaa/bbb/ccc
G. Resolving with trailing sequences of ./ in the base IRI
BASE http://example.org/xxx/yyy/zzz/./, resolving ../aaa/bbb/ccc
EYE http://example.org/xxx/yyy/zzz/aaa/bbb/ccc
cwm http://example.org/xxx/yyy/zzz/aaa/bbb/ccc
N3.js http://example.org/xxx/yyy/zzz/aaa/bbb/ccc
Serd http://example.org/xxx/yyy/zzz/aaa/bbb/ccc
BASE http://example.org/xxx/yyy/zzz/././, resolving ../aaa/bbb/ccc
EYE http://example.org/xxx/yyy/zzz/./aaa/bbb/ccc
cwm http://example.org/xxx/yyy/zzz/./aaa/bbb/ccc
N3.js http://example.org/xxx/yyy/zzz/./aaa/bbb/ccc
Serd http://example.org/xxx/yyy/zzz/./aaa/bbb/ccc
BASE http://example.org/xxx/yyy/zzz/./././, resolving ../aaa/bbb/ccc
EYE http://example.org/xxx/yyy/zzz/././aaa/bbb/ccc
cwm http://example.org/xxx/yyy/zzz/././aaa/bbb/ccc
N3.js http://example.org/xxx/yyy/zzz/././aaa/bbb/ccc
Serd http://example.org/xxx/yyy/zzz/././aaa/bbb/ccc
H. Resolving with trailing sequences of ../ in the base IRI
BASE http://example.org/xxx/yyy/zzz/../, resolving ../aaa/bbb/ccc
EYE http://example.org/xxx/yyy/zzz/aaa/bbb/ccc
cwm http://example.org/xxx/yyy/zzz/aaa/bbb/ccc
N3.js http://example.org/xxx/yyy/zzz/aaa/bbb/ccc
Serd http://example.org/xxx/yyy/zzz/aaa/bbb/ccc
BASE http://example.org/xxx/yyy/zzz/../../, resolving ../aaa/bbb/ccc
EYE http://example.org/xxx/yyy/zzz/../aaa/bbb/ccc
cwm http://example.org/xxx/yyy/zzz/../aaa/bbb/ccc
N3.js http://example.org/xxx/yyy/zzz/../aaa/bbb/ccc
Serd http://example.org/xxx/yyy/zzz/../aaa/bbb/ccc
BASE http://example.org/xxx/yyy/zzz/../../../, resolving ../aaa/bbb/ccc
EYE http://example.org/xxx/yyy/zzz/../../aaa/bbb/ccc
cwm http://example.org/xxx/yyy/zzz/../../aaa/bbb/ccc
N3.js http://example.org/xxx/yyy/zzz/../../aaa/bbb/ccc
Serd http://example.org/xxx/yyy/zzz/../../aaa/bbb/ccc
I. Resolving with trailing mixed sequences of ./ and ../ in the base IRI
BASE http://example.org/xxx/yyy/zzz/.././, resolving ../aaa/bbb/ccc
EYE http://example.org/xxx/yyy/zzz/../aaa/bbb/ccc
cwm http://example.org/xxx/yyy/zzz/../aaa/bbb/ccc
N3.js http://example.org/xxx/yyy/zzz/../aaa/bbb/ccc
Serd http://example.org/xxx/yyy/zzz/../aaa/bbb/ccc
BASE http://example.org/xxx/yyy/zzz/./../, resolving ../aaa/bbb/ccc
EYE http://example.org/xxx/yyy/zzz/./aaa/bbb/ccc
cwm http://example.org/xxx/yyy/zzz/./aaa/bbb/ccc
N3.js http://example.org/xxx/yyy/zzz/./aaa/bbb/ccc
Serd http://example.org/xxx/yyy/zzz/./aaa/bbb/ccc
BASE http://example.org/xxx/yyy/zzz/.././../, resolving ../aaa/bbb/ccc
EYE http://example.org/xxx/yyy/zzz/.././aaa/bbb/ccc
cwm http://example.org/xxx/yyy/zzz/.././aaa/bbb/ccc
N3.js http://example.org/xxx/yyy/zzz/.././aaa/bbb/ccc
Serd http://example.org/xxx/yyy/zzz/.././aaa/bbb/ccc
BASE http://example.org/xxx/yyy/zzz/./.././, resolving ../aaa/bbb/ccc
EYE http://example.org/xxx/yyy/zzz/./../aaa/bbb/ccc
cwm http://example.org/xxx/yyy/zzz/./../aaa/bbb/ccc
N3.js http://example.org/xxx/yyy/zzz/./../aaa/bbb/ccc
Serd http://example.org/xxx/yyy/zzz/./../aaa/bbb/ccc
BASE http://example.org/xxx/yyy/zzz/.././.././../, resolving ../aaa/bbb/ccc
EYE http://example.org/xxx/yyy/zzz/.././.././aaa/bbb/ccc
cwm http://example.org/xxx/yyy/zzz/.././.././aaa/bbb/ccc
N3.js http://example.org/xxx/yyy/zzz/.././.././aaa/bbb/ccc
Serd http://example.org/xxx/yyy/zzz/.././.././aaa/bbb/ccc
BASE http://example.org/xxx/yyy/zzz/./.././.././, resolving ../aaa/bbb/ccc
EYE http://example.org/xxx/yyy/zzz/./.././../aaa/bbb/ccc
cwm http://example.org/xxx/yyy/zzz/./.././../aaa/bbb/ccc
N3.js http://example.org/xxx/yyy/zzz/./.././../aaa/bbb/ccc
Serd http://example.org/xxx/yyy/zzz/./.././../aaa/bbb/ccc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment