-
Notifications
You must be signed in to change notification settings - Fork 35
Possible use of non-URL values as the base URL in expand() #373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
And that would result in an error, which is fine. |
This is not a well-defined error, though. Context Processing 5.2 just says:
When this blows up, what is the expected behavior? Ignoring the error? Returning early? Raising an exception? |
So, you do that resolution and get something. You then attempt to retrieve that something and will get an error. Basically, it's an array, or a map, null, or a string. If it's a string, then it is presumed that resolving against base IRI will result in a string, that may or may not be a valid IRI. If it's not valid, or nothing can be retrieved, it will blow up in 5.2.4 when we attempt to retrieve it. |
My contention is that you can't even get to the point of performing "that resolution," because you won't have a base IRI to resolve against. If the |
What language. Would satisfy you? I don’t really see how the base IRai would ever be something like an empty map. It’s either an IRI, or null. Certainly trying to resolve a relative IRI against null doesn’t make sense. We could say to resolve if against base IRI is it is not null, otherwise to just use context as is. |
As I mentioned above,
That seems to me like any value could be passed as a
Where does this constraint come from?
I think language that accepts the possibility of |
…absolute) when it can't be resolved against _base URL_, because it is also not a valid IRI. Update `expand()` to pass the _original base URL_ from the current _active context_ when creating a new _active context_ using _expandContext_. Fixes #373.
Updated in #377. |
@gkellogg the new text for raising a loading document failed error looks good. Thanks. |
…absolute) when it can't be resolved against _base URL_, because it is also not a valid IRI. Update `expand()` to pass the _original base URL_ from the current _active context_ when creating a new _active context_ using _expandContext_. Fixes #373.
Uh oh!
There was an error while loading. Please reload this page.
(Related to #265, #356)
expand()
step 5:What if
expandContext
is not a URL and not a map having a@context
entry? This will result in a non-URL being passed as the base URL.The text was updated successfully, but these errors were encountered: