Use the proper HTML handler

This commit is contained in:
Bradlee Speice 2014-09-01 08:09:49 -04:00
parent c26beac6bb
commit cc0c681bae
2 changed files with 6 additions and 2 deletions

View File

@ -1,8 +1,10 @@
package org.bspeice.minimalbible.service.book;
import android.support.v4.util.LruCache;
import android.util.Log;
import org.bspeice.minimalbible.service.format.OsisToCanonicalTextSaxHandler;
import org.bspeice.minimalbible.service.format.osistohtml.OsisToHtmlParameters;
import org.bspeice.minimalbible.service.format.osistohtml.OsisToHtmlSaxHandler;
import org.crosswire.common.xml.SAXEventProvider;
import org.crosswire.jsword.book.Book;
import org.crosswire.jsword.book.BookData;
@ -74,8 +76,9 @@ public class VerseLookupService implements Action1<Verse> {
BookData bookData = new BookData(book, v);
try {
SAXEventProvider provider = bookData.getSAXEventProvider();
OsisToCanonicalTextSaxHandler handler = new OsisToCanonicalTextSaxHandler();
OsisToHtmlSaxHandler handler = new OsisToHtmlSaxHandler(new OsisToHtmlParameters());
provider.provideSAXEvents(handler);
Log.e(this.getClass().getName(), handler.toString());
return handler.toString();
} catch (BookException e) {
e.printStackTrace();

View File

@ -81,6 +81,7 @@ public class OsisToHtmlSaxHandler extends OsisSaxHandler {
verseHandler = new VerseHandler(parameters, verseInfo, getWriter());
myNoteMarker = new MyNoteMarker(parameters, verseInfo, getWriter());
bookmarkMarker = new BookmarkMarker(parameters, verseInfo, getWriter());
noteHandler = new NoteHandler(parameters, verseInfo, getWriter());
referenceHandler = new ReferenceHandler(parameters, noteHandler, getWriter());
refHandler = new RefHandler(parameters, noteHandler, getWriter());
titleHandler = new TitleHandler(parameters, verseInfo, getWriter());