[jsword-devel] [JIRA] Created: (JS-198) Does JSword use Basis for incomplete refs in TSK

Martin Denham (JIRA) jira at crosswire.org
Thu Jun 23 14:08:06 MST 2011


Does JSword use Basis for incomplete refs in TSK
------------------------------------------------

                 Key: JS-198
                 URL: http://www.crosswire.org/bugs/browse/JS-198
             Project: JSword
          Issue Type: Bug
          Components: o.c.jsword.book.filter.thml
    Affects Versions: 1.6.1
            Reporter: Martin Denham
            Assignee: DM Smith


Passages like TSK Matt 21:21 contain incomplete references like "17:20; Mr 11:22,23; Lu 17:6,7; Ro 4:19,20; 1Co 13:2; Jas 1:6".  Note the first ref has no book name but is assumed to refer to Matthew.

This doesn't seem to be handled properly by ScripRefTag.  It would be good if ScripRefTag used a Basis but I can't see any way to make it do that.

In my tests ScripRefTag throws and catches a NoSuchKeyException in processContent.

This test isn't great but it would allow you to step quickly into the relevant code:

Book book = Books.installed().getBook("TSK");
Key key = book.getKey("Matt 21:21");
BookData data = new BookData(book, key);		
SAXEventProvider osissep = data.getSAXEventProvider();

final StringBuilder tags = new StringBuilder();
ContentHandler saxHandler = new DefaultHandler() {
	@Override
	public void startElement(String uri, String localName,	String qName, Attributes attributes) throws SAXException {
		tags.append("<"+qName+">");
	}
};

osissep.provideSAXEvents(saxHandler);
String html = tags.toString();
System.out.println(html);

I am planning to work around this by prepending the current book name if there is no ref string passed to And Bible but that is a bit of a fudge.

--
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