Open lo48576 opened 2 years ago
What is the result of relativizing foo:////bar
against foo://
?
//bar
would be valid as a path, but not interpreted as expected if it is a relative IRI reference.
//bar
against foo://
is foo://bar
..///bar
would be valid both as a path and as a relative IRI reference, but is it intended by the user?Would making the algorithm configurable be a solution?
Relativizing foo:///bar:baz
against foo:///
would have similar problem.
What is expected, bar:baz
(interpretable as scheme=bar
and path=baz
), or ./bar:baz
?
The two results would have different types (a path and a relative IRI reference), so maybe the feature should be provided by different names, for example relativize_as_path_against()
and relativize_as_iri_ref_against()
.
relativize_against()
or similar functionalities would be useful for servers or static site generators.