Closed iSnow closed 4 years ago
I'd like some clarity here - in the path attribute of a Data Resource, are path fragments allowed or not? If yes, do I understand it right that if the Descriptor (datapackage.json) is loaded from an URL, every path fragment is considered a relative URL, relative to the Descriptor URL? And if the Descriptor is loaded from a local file, it is considered a relative file system path?
That is the correct interpretation. Note, strictly, the spec simply defines what is acceptable in that field and the hermenutics of that (i.e. the usage / meaning) can be indicated (and are indicated) but are, strictly, up to the implementor.
FIXED. Feel free to re-open if needed 😄
The specs say:
URL or Path A "url-or-path" is a string with the following additional constraints:
Examples:
So, on the one hand, we have "URLs MUST be fully qualified.", which means they have to be prefixed with http/https and the domain name. On the other hand, unqualified URLs work as a relative path online. That seems contradictory to me.
I'd like some clarity here - in the
path
attribute of a Data Resource, are path fragments allowed or not? If yes, do I understand it right that if the Descriptor (datapackage.json
) is loaded from an URL, every path fragment is considered a relative URL, relative to the Descriptor URL? And if the Descriptor is loaded from a local file, it is considered a relative file system path?OR
unqualified URL fragments are not allowed and the note above is wrong.