Re: [whatwg/url] [Editorial] Replace the term 'cannot-be-a-base' with hierarchical/non-hierarchical (#634)

Having looked at this again I realized that the cannot-be-a-base-URL bit is technically wrong as it can be a base URL if the relative URL starts with `#` (step 2 of no scheme state). https://datatracker.ietf.org/doc/html/rfc3986#section-1.2.3 calls `#` a hierarchical component so arguably saying the URL is not hierarchical would also be wrong as all URLs are at least somewhat hierarchical.

Another thought I had that I rather like is to attempt to change the data model. A path would be either a string or a list of strings. This is essentially what the boolean does, but makes it more explicit by coupling the path and cannot-be-base-URL members together in a single member. And then we could define something like

> A URL _url_ has a **hierarchical path** if its _url_'s path is a list.

as a convenience and use that in various places.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/634#issuecomment-932047986

Received on Friday, 1 October 2021 08:56:54 UTC