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

Add ability to distinguish headers automatically added by JSword in dictionary entries

    Details

      Description

      Jsword automatically adds the key as a header on each page. With bibles these can be distinguished and not shown because they have the type="x-gen" attribute but this attribute is not added for dictionary entries.

      It would be good to distinguish and hide the JSword generated header because the heading for dictionary pages in And Bible is currently shown 3 times - page header, Jsword added header, in page header.

      This can be done by adding the title.setAttribute line to the code in SwordDictionary.getOsisIterator as below:

      public Iterator<Content> getOsisIterator(Key key, boolean allowEmpty) throws BookException {
      checkActive();

      assert key != null;
      assert backend != null;

      List<Content> content = new ArrayList<Content>();
      Element title = OSISUtil.factory().createTitle();
      // this attribute marks the header as being automatically added by JSword
      title.setAttribute(OSISUtil.OSIS_ATTR_TYPE, OSISUtil.GENERATED_CONTENT);
      title.addContent(key.getName());
      content.add(title);

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: