> I would also like to see, as a default or an option, for urls in the
> annotation to be shown as relative urls when possible. That would make
> the annotation easier to read quickly.
I agree that this is a good idea, but it's not trivial. I won't get a
chance to look at it this week and I would welcome someone else
implementing it.
I don't think we can get the raw href specified by the author of a page
from the DOM; the element.href has been canonicalized. In any case, we
may want to view a relative URL even when the page gives an absolute
one. So I think we need to contruct the relative url by hand.
Relative URLs are described in RFC 1808, but from the point of view of
interpreting, not constructing, them. Some examples listed in section
5.1 can be used for test cases. Some things to be aware of:
- only applies to certain schemes
- the page may specify a different base url; presumably we would not
want to honour that in the reported relative url
- a URL may have a dir/file ambiguity; that is, both http://foo/a and
http://foo/a/b may be valid web page addresses; that may complicate
things
- multiple forms are possible; when is it better to use multiple
.. elements (eg. ../../d) rather than starting from the path root
(eg. /a/b/c/d)
Regards, David
_______________________________________________
Conkeror mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/conkeror