On Mon, 13 Apr 2015 16:41:12 -0700 Thiago Macieira <[email protected]> wrote:
> On Monday 13 April 2015 23:31:26 Mattias Andrée wrote: > > > As for x11, it is covered just fine with x11::0. > > > > But that is not convered by the generic syntax for > > URL:s. > > Yes it is. RFC 3986, Appendix A has the ABNF for URIs. > > Decoding (only the relevant parts): > URI = scheme ":" hier-part [ "?" query ] > [ "#" fragment ] scheme = ALPHA *( ALPHA / DIGIT / > "+" / "-" / "." ) > > hier-part = "//" authority path-abempty > / path-absolute > / path-rootless > / path-empty > > path-rootless = segment-nz *( "/" segment ) > > segment-nz = 1*pchar > pchar = unreserved / pct-encoded / > sub-delims / ":" / "@" unreserved = ALPHA / DIGIT / > "-" / "." / "_" / "~" > > So it decodes to > scheme "x11" > ":" ":" > hier-part ":0" > path-rootless ":0" > segment-nz ":0" > > This is the same expansion that allows for > mailto:[email protected]. > > > It would have to be x11:///0 for :0 and x11:///0/1 > > or (less preferable) x11:///0.1 for :0.1. > > And x11://localhost/0.1 or x11://localhost/0/1 > > for localhost:0.1 > > The generic syntax is > > scheme://[[username[:password]@]host[:port]][/[path][?query][#fragment]] > > And we must assume that libraries will parse <port> as > > an > > Your syntax is incorrect. The authority and the double > slash are optional. And even when they are present, the > expansion for authority → host → reg-name allows for it > to be empty too: > > reg-name = *( unreserved / pct-encoded / > sub-delims ) > > If that weren't the case, file:///etc/passwd wouldn't be > valid. > As I wrote it, the only thing that was mandatory was scheme://, of course the absolute minimum was scheme: But arguing whether it is covered or not is uninteresting; it was just an example.
pgp_WYIm8Bg5L.pgp
Description: OpenPGP digital signature
_______________________________________________ xdg mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/xdg
