[jsword-devel] [JIRA] Created: (JS-214) Add ability to distinguish headers automatically added by JSword in dictionary entries
Martin Denham (JIRA)
jira at crosswire.org
Wed Mar 21 13:54:36 MST 2012
Add ability to distinguish headers automatically added by JSword in dictionary entries
--------------------------------------------------------------------------------------
Key: JS-214
URL: http://www.crosswire.org/bugs/browse/JS-214
Project: JSword
Issue Type: Improvement
Components: o.c.jsword.book.sword
Reporter: Martin Denham
Assignee: DM Smith
Priority: Minor
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);
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jsword-devel
mailing list