[whatwg/url] Non-Windows-file URL definition (#128)

Hi all,

The following statement is confusing and can be read to mean the opposite of its intended meaning (or what I assume is its intended meaning):

> A path-absolute non-Windows-file URL must be a path-absolute URL that does not start with "/", followed by a Windows drive letter, followed by "/".

It can be read as requiring that such a URL:

1. does not start with a slash
2. _**is**_ followed by a Windows drive letter
3. which _**is**_ followed by a slash

I recommend revising it to be unambiguous, possibly by appending a colon after the word _that_ and explicitly grouping the three constituents into a sequence or string that you are saying cannot exist in such a URL.

Note that a "Windows drive letter" is elsewhere defined as a letter followed by a colon or pipe, so you could probably inline that definition here and just say that the URL can't start with that sequence. After all, there's no way to know if something is a Windows drive letter anyway – all you can define and enforce is a sequence of codepoints. (Also, why would a Windows file path _start_ with a slash (before the drive letter)? I've never seen that.)

More broadly, I think it's awkward to say _must_ in all your definitions. For example:

> A scheme-relative file URL must be "//", followed by one of the following

It makes more sense to say that a scheme-relative URL **_is_** "//" followed by... That's just what it is, by definition. The word _must_ is more appropriate in describing required _behavior_, like that of a parser or application. A scheme-relative URL just _is_ what it is – it mustn't do anyting.

Cheers,

Joe

---
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/128

Received on Sunday, 19 June 2016 17:35:19 UTC