Skip to content
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

Add relativizer #16

Open
lo48576 opened this issue Mar 23, 2022 · 3 comments
Open

Add relativizer #16

lo48576 opened this issue Mar 23, 2022 · 3 comments
Labels
design enhancement New feature or request low-priority Low priority

Comments

@lo48576
Copy link
Owner

lo48576 commented Mar 23, 2022

relativize_against() or similar functionalities would be useful for servers or static site generators.

@lo48576 lo48576 added the enhancement New feature or request label Mar 23, 2022
@lo48576 lo48576 added the low-priority Low priority label Jun 11, 2022
@lo48576
Copy link
Owner Author

lo48576 commented Jun 19, 2022

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.
    • In this case, resolving //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?

@lo48576
Copy link
Owner Author

lo48576 commented Jun 19, 2022

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?

@lo48576
Copy link
Owner Author

lo48576 commented Jun 19, 2022

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().

@lo48576 lo48576 added the design label Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design enhancement New feature or request low-priority Low priority
Projects
None yet
Development

No branches or pull requests

1 participant