Details
-
Type: Improvement
-
Status: Closed (View Workflow)
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.7
-
Component/s: o.c.jsword.book.sword
-
Labels:None
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);