Live data from Hacker News

Matrix URIs, a URL syntax from Tim Berners-Lee that never shipped (1996)

w3.org

21–30 of 35 posts

Re: Matrix URIs, a URL syntax from Tim Berners-Lee that never shipped (1996)

#21
post #18
post #4

Earlier quoted context omitted.

Seems Like the recommendation changed from supporting ; and & to only using &. Thinking about it, it is a little surprising as, if I remember correctly, in HTML source you should encode & as & right?

& as an escape character only applies to text nodes. Of course, if you want to display the URL on a page, you have to escape it, but not in the href.

I just found out you may - even in current HTML use entity references in attribute values, it’s just you don’t have to anymore, when the ampersand is not ambiguous.

The spec states it as: “Attribute values are a mixture of text and character references, except with the additional restriction that the text cannot contain an ambiguous ampersand.”

Whereas in the the days before HTML5 this has been mandatory.

> HTML 4.01 Specification – Appendix B.2.2 “Ampersands in URI attribute values”

https://www.w3.org/TR/html401/appendix/notes.html#h-B.2.2

> Unfortunately, the use of the “&” character to separate form fields interacts with its use in SGML attribute values to delimit character entity references.

Re: Matrix URIs, a URL syntax from Tim Berners-Lee that never shipped (1996)

#22

The generic URI syntax actually specifies that any path segment within a URI can be divided up into parts by semicolons (or commas), and suggests using key=value as parameters within that segment. http://tools.ietf.org/html/rfc3986#section-3.3 For example, the semicolon (";") and equals ("=") reserved characters are often used to delimit parameters and parameter values applicable to that segment. The comma (",") rese…

The whole third part of the posted document is about relative urls.

Re: Matrix URIs, a URL syntax from Tim Berners-Lee that never shipped (1996)

#23
post #18
post #4

Earlier quoted context omitted.

Seems Like the recommendation changed from supporting ; and & to only using &. Thinking about it, it is a little surprising as, if I remember correctly, in HTML source you should encode & as & right?

& as an escape character only applies to text nodes. Of course, if you want to display the URL on a page, you have to escape it, but not in the href.

That is incorrect. Entities apply to attributes.

In HTML escaping & is kind of optional and the browser just tries to figure out what you mean, but if you are doing things properly you should use & in href attributes.

Re: Matrix URIs, a URL syntax from Tim Berners-Lee that never shipped (1996)

#25
post #2

I quite like the semi-colons. I wonder how we ended up with the slightly unwieldy ?foo=bar&some=thing

Is there any reason we couldn't just use that anyway?

Just one minor one why you might not want to. HTTP{S}? handling objects understand the URL parameter syntax and do parsing for you, so when you write a request handler, you are dealing with structured dictionaries of request headers and URL parameters.

Re: Matrix URIs, a URL syntax from Tim Berners-Lee that never shipped (1996)

#26
post #18

Earlier quoted context omitted.

& as an escape character only applies to text nodes. Of course, if you want to display the URL on a page, you have to escape it, but not in the href.

I just found out you may - even in current HTML use entity references in attribute values, it’s just you don’t have to anymore, when the ampersand is not ambiguous. The spec states it as: “Attribute values are a mixture of text and character references, except with the additional restriction that the text cannot contain an ambiguous ampersand.” Whereas in the the days before HTML5 this has been mandatory. > HTML 4.01…

That's the same as main body text isn't it? And you have to be able to use them so you can escape " just like you have to escape HTML5 standardized how to interpret formerly invalid documents because it was more important to be consistent than to be correct.

Re: Matrix URIs, a URL syntax from Tim Berners-Lee that never shipped (1996)

#27
post #22

The generic URI syntax actually specifies that any path segment within a URI can be divided up into parts by semicolons (or commas), and suggests using key=value as parameters within that segment. http://tools.ietf.org/html/rfc3986#section-3.3 For example, the semicolon (";") and equals ("=") reserved characters are often used to delimit parameters and parameter values applicable to that segment. The comma (",") rese…

The whole third part of the posted document is about relative urls.

Right - the URI spec, on the other hand says nothing about this idea of a relative URL modifying one or more of these paths segment parameters.

Re: Matrix URIs, a URL syntax from Tim Berners-Lee that never shipped (1996)

#30

Earlier quoted context omitted.

Is there any reason we couldn't just use that anyway?

You can use it if you want, but the browser doesn’t help you at all. It can’t automatically turn a form into a matrix URI, and it can’t do anything useful with relative matrix URIs.

You're saying that as if developers have cared about the platform in the past twenty years. Use JS, everything is possible, even turning a div into a link, apparently.
Post reply on HN