Uploaded image for project: 'JSword'
  1. JSword
  2. JS-213

Missing code in thml.ATag causes missing osisRef attribute in reference

    Details

      Description

      I believe there is some missing code in thml.ATag. In StrongsRealGreek there are references like:

      <a href="sword://StrongsRealGreek/01909">1909</a>

      and the above is currently converted to OSIS as:

      <reference>1909</reference>

      However I think it should be:

      <reference osisRef="sword://StrongsRealGreek/01909">1909</reference>

      Joe has left the following comment in ATag which seems to confirm that some code is missing:

      // LATER(joe): put the correct reference here

      I added the following just before Joe's comment which seems to fix the problem:

      String href = attrs.getValue("href");
      if (href!=null && !href.isEmpty())

      { reference.setAttribute(OSISUtil.OSIS_ATTR_REF, href); }

      I will attach the amended ATag.java and also a junit test. If nobody comments adversely before next week then I can check in the junit and fixed code next week.

      There is probably also an issue with xml like "<a name="01993">1993</a>" which is not addressed by the attached fix.

        Attachments

          Activity

            People

            • Assignee:
              dmsmith DM Smith
              Reporter:
              mjdenham Martin Denham
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: