<ref> elements not generating correct HTML links for notes

Issue #43 resolved
Craig Berry created an issue

An example is the following:

<ref xml:id="A01520-e106410-a" corresp="A01520-e106410-b" target="A01520-e106410-b"/>

<note anchored="true" place="margin" xml:id="A01520-e106410-b" corresp="A01520-e106410-a">
...
</note>

What we see in the app is an anchor tag whose href is the contents of ref/target, which of course is a non-working link. Marginal notes have worked in the past, so it remains to be seen if something broke what was working or if the broken ones are encoded differently.

Comments (3)

  1. Craig Berry reporter

    This is the result of moving marginal notes to the end of the document. The eXist app will process them ok if they are left in proximity with the place in the text to which they are attached, but it does not have any special handling of <ref> elements that would retrieve what they are pointing to from far-flung corners of the document. Whether such a capability should be added or whether the notes should be put back where they were is currently under debate.

  2. Craig Berry reporter

    Notes have been moved back to being adjacent to the associated ref elements, but that didn't solve the problem. The vast majority of cases were fixed by the following:

    #!
    
    commit 06556b6322c543dd02ec3d6b3030542d32a83470
    Author: Craig A. Berry <craigberry@mac.com>
    Date:   Thu Mar 1 07:10:35 2018 -0600
    
        Remove behaviour="link" from <ref> in ODD.
    
        The links we have currently don't do anything useful when converted
        to HTML; they just blindly take the target attribute and put it in
        the href attribute.  So put them inline and make the <ref> content
        (if any) superscript so there is a visual indicator that we are
        pointing to a note.
    
        Leave the link behavior when within teiHeader as those links are
        valid hrefs (although we aren't actually displaying any in the
        application currently).
    
        TODO: while almost all <ref>s point to marginal notes where there
        is no real need to link to them, there are some footnotes and
        endnotes and ideally it would be good to have a way to produce
        a meaningful link to the page where they reside.
    
  3. Log in to comment