The master-plan for simplicity
The issue of linking inside and outside the site is something that really needs to be dealt with. Right now, there's a proliferation of different types of link, specified by the @type attribute on the <ref> element; this is the range of instances currently in the XML files (some obviously typos, and some errors):
internal bibl detail external 'detail pers name CORN1 library special topics detal SIRT1 URI
I propose the following:
- The @type attribute should just be dropped, and deleted from existing
<ref>elements. - There should be two types of reference, distinguished by what their @target attribute looks like:
<ref target="mol:ADAM4"><ref target="http://some.url/">
- When the output (XSLT) system sees
@targetstarting withmol:, it knows it has an internal reference. In that case, it constructs a simple link consisting of the relevant @xml:id (which issubstring-after(@ref, 'mol:')) followed by.htm. - The
controller.xqlandindex.xqlfiles are able to figure out where the relevant@xml:idis, and process it accordingly. So, for instance, if it finds a TEI file in/db/data/which has that @xml:id attribute on its root element, it processes that; if it finds a person element in PERS1.xml which has that @xml:id, it processes accordingly. - When the output (XSLT) system sees @target which does not start with
mol:, it assumes an external link, and creates an anchor accordingly. - In the case of name tags, which also give rise to links to people, I have already converted all @key="ADAM4" instances to @ref="mol:ADAM4", and links are being created accordingly.
This means that all pages are being served out of the root of the site, and as long as all @xml:ids are unique, everything is accessible in that way. There may still be a couple of details to work out relating to @type on <name> (which is possibly worth keeping, although I don't think it's being used for anything useful at the moment), and the various uses of <bibl> (which I think in some cases ought to be <ref>s).