Skip to content

Verify URI resolution relative to base without trailing slash#430

Merged
gkellogg merged 2 commits into
w3c:masterfrom
fsteeg:test-base-no-trailing-slash
Mar 25, 2020
Merged

Verify URI resolution relative to base without trailing slash#430
gkellogg merged 2 commits into
w3c:masterfrom
fsteeg:test-base-no-trailing-slash

Conversation

@fsteeg
Copy link
Copy Markdown
Member

@fsteeg fsteeg commented Mar 24, 2020

This came up when fixing jsonld-java/jsonld-java#279 in jsonld-java/jsonld-java#280, where we noticed the original issue described on the Apache Jena list was not covered by the spec tests.

Relative resolution in RFC 3986 [1][2] (see 8) in spec [3]):

  • rel relative to example is example/rel
  • rel relative to example/base is also example/rel

Already tested elsewhere, for clarity here, with trailing slash:

  • rel relative to example/base/ is example/base/rel

[1] https://tools.ietf.org/html/rfc3986#section-5.2
[2] https://blog.cdivilly.com/2019/02/28/uri-trailing-slashes
[3] https://w3c.github.io/json-ld-api/#algorithm-4

Relative resolution in RFC 3986 [1][2] (see `8)` in spec [3]):

- `rel` relative to `example` is `example/rel`
- `rel` relative to `example/base` is also `example/rel`

Already tested elsewhere, for clarity here, with trailing slash:

- `rel` relative to `example/base/` is `example/base/rel`

[1] https://tools.ietf.org/html/rfc3986#section-5.2
[2] https://blog.cdivilly.com/2019/02/28/uri-trailing-slashes
[3] https://w3c.github.io/json-ld-api/#algorithm-4
@gkellogg
Copy link
Copy Markdown
Member

gkellogg commented Mar 24, 2020

0130 seems to be similar to toRdf/0128, but there isn't an expand version of this AFAICT.

Ruby passes them all okay, but pyld fails 0129, so clearly testing a corner case. Looks like the playground (jsonld.js) isn't passing 0129 either.

We'll need toRdf versions of these as well, and both expand-manifest.html (and toRdf-manifest.html) should be updated using the rake task, but if you have problems with this, I can update after the fact.

@gkellogg
Copy link
Copy Markdown
Member

Also, note that toRdf versions should be named "e129" and "e130" to match the naming scheme for other expansion tests brought over.

@fsteeg
Copy link
Copy Markdown
Member Author

fsteeg commented Mar 25, 2020

Thanks @gkellogg, I've added toRdf tests and the rake output. Hope I got it right.

@gkellogg
Copy link
Copy Markdown
Member

Thanks for the extra effort, @fsteeg!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants