Sun Mar 28 11:59:41 CEST 2010
It seems that most of the core problems are easy to solve for a
tree-based datastructure. The missing component is cross-linking.
The problem is that this violates hierarchical composition: a network
no longer has a recursive "collection of lower level entities"
semantics; it's a big ball of mud instead.
Can the linking be orchestrated by a single global linker entity?
linker :: doctree -> graph
That doesn't work as the doctree itself has (open) embedded
crosslinks. So, essentially we need to view a doctree as an open
linker :: docenv -> doctree -> graph
So, how to represent open terms? Two things need to be unified:
1. the original source has some representation of links
(i.e. standard http:// links or custom entry:// links) that needs
to be mapped to the identifiers used by the naming scheme.
2. identifiers need to be mapped to raw links.
Let's start the lib/link.ss module to implement this behaviour. The
first modification is in the article body parser.
Following the remark above we need to distinguish the ramblings syntax
from the link mechanism we want to abstract. Essentially, the
ramblings syntax has two kinds of links: external ones (standard http
or transformed links like isbn or img) and internal cross links. The
latter ones are important to capture.
It seems this is not really necessary for the ramblings docs. The
references used are already compatible with a tree + up-dir
representation. So maybe this is only for indexing?
Side note: see  for links about representing graphs in functional
languages. The first one is a zipper rep.