[jsword-devel] [JIRA] Created: (JS-199) THML CustomHandler compatibility with older xml parser
Martin Denham (JIRA)
jira at crosswire.org
Fri Jun 24 14:26:57 MST 2011
THML CustomHandler compatibility with older xml parser
------------------------------------------------------
Key: JS-199
URL: http://www.crosswire.org/bugs/browse/JS-199
Project: JSword
Issue Type: Bug
Components: o.c.jsword.book.filter.thml
Affects Versions: 1.6.1
Reporter: Martin Denham
Assignee: DM Smith
Some older xml parsers pass in a localname but no qname to:
public void startElement(String uri, String localname, String qname, Attributes attrs)
Unfortunately there is code in CustomHandler that ignores localname and assumes qname is valid.
Android 2.3 passes in qname as expected but the slightly older Android 2.1 only passes in localname and thus THML->OSIS conversion doesn't work.
The simple fix is to check if qname is empty and if it is then use localname. This fix is local to the getTag method. I have attached a patch file that does this.
I don't know if this problem affects other parts of JSword. I only stumbled over it because I was looking for OSIS reference tags created from THML scripRef tags.
--
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