Currently links between APIs refer to the
website. This is fine when browsing them online to
begin with, but annoying when browsing them
offline (from within NB using the
apisupport/apidocs module). Possibilities:
1. Have apisupport/apidocs register a URLMapper to
convert URLs with the prefix
the proper nbfs: URLs. Problems: (a) URLMapper
provides no URL -> URL facility. (b) Not at all
clear how to make this work w/ externalbrowser +
httpserver - would need to convert to and from
internal representation? Very ugly.
2. Make the javadoc module add an optional
URL-valued "mirror" to its javadoc DTD, indicating
what online prefix this doc set mirrors. Then in
its environment provider for the DTD, filter the
returned filesystem (MFS can be a filter) as
follows: for any file object whose content type is
text/html, override the length and input stream
methods to get the real content, then go through
the HTML and rewrite links. Any links (just <a
href="..."> I guess) which pointed to a URL with a
prefix in the mirror list of a mounted javadoc FS,
would be written to point to the file object in
that other FS (using URLMapper.EXTERNAL I guess).
This is a cleaner solution but probably more work.
I think Yarda is working on this, somehow.
All javadocs now use relative links to refer to each other. So the support is
there. We just need to verify that it is used correctly.