3 ms·
> I particularly like how URIs are sometimes encoded as attributes and sometimes as child text elements. I think the distinction here is that the one is an ide
by j4_james 10y ago
> I particularly like how URIs are sometimes encoded as attributes and sometimes as child text elements.
I think the distinction here is that the one is an identifier which is not intended to be dereferencable, and the other is a link to a resource which has to be retrievable. In the good old days the id would most likely have been a URN and the link a URL, but that distinction was being discouraged in favour of the more general URI term at the time the Atom spec was developed. [1]
So while they're syntactically both URIs (well technically IRIs), they're functionally quite different. It may be debatable whether that's a good enough reason for the one to be an element value and the other an attribute value, but I don't think that decision was obviously wrong.
[1] https://tools.ietf.org/html/rfc3986#section-1.1.3 https://tools.ietf.org/html/rfc3986#section-1.1.3