Uploaded image for project: 'JSword'
  1. JSword
  2. JS-199

THML CustomHandler compatibility with older xml parser

    Details

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              dmsmith DM Smith
              Reporter:
              mjdenham Martin Denham
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: