From cc0c681bae68836cc5f56d115ff8cfabc079fb24 Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Mon, 1 Sep 2014 08:09:49 -0400 Subject: [PATCH] Use the proper HTML handler --- .../minimalbible/service/book/VerseLookupService.java | 7 +++++-- .../service/format/osistohtml/OsisToHtmlSaxHandler.java | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/bspeice/minimalbible/service/book/VerseLookupService.java b/app/src/main/java/org/bspeice/minimalbible/service/book/VerseLookupService.java index 107c327..844d047 100644 --- a/app/src/main/java/org/bspeice/minimalbible/service/book/VerseLookupService.java +++ b/app/src/main/java/org/bspeice/minimalbible/service/book/VerseLookupService.java @@ -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 { 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(); diff --git a/app/src/main/java/org/bspeice/minimalbible/service/format/osistohtml/OsisToHtmlSaxHandler.java b/app/src/main/java/org/bspeice/minimalbible/service/format/osistohtml/OsisToHtmlSaxHandler.java index 62fba4d..4973268 100644 --- a/app/src/main/java/org/bspeice/minimalbible/service/format/osistohtml/OsisToHtmlSaxHandler.java +++ b/app/src/main/java/org/bspeice/minimalbible/service/format/osistohtml/OsisToHtmlSaxHandler.java @@ -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());