[jsword-devel] [JIRA] Commented: (JS-213) Missing code in thml.ATag causes missing osisRef attribute in reference

Martin Denham (JIRA) jira at crosswire.org
Mon Mar 19 15:40:04 MST 2012


    [ http://www.crosswire.org/bugs/browse/JS-213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=24670#comment-24670 ] 

Martin Denham commented on JS-213:
----------------------------------

I am not sure whether to commit the ATag change or leave it until later.  I am trying to think if it could break anything by passing a uri through from a document.  I think the only documents that have those uris are in Xiphos and most Jsword apps can't use Xiphos modules.

Meanwhile I also notice that I had to make another change (JS-199) in a similar area that could be committed at the same time.

I am not really thinking about writing a generic uri handling functionality.  I don't think I could add enough value in that area, but if you were to create one in the future I would try to use it.

> Missing code in thml.ATag causes missing osisRef attribute in reference
> -----------------------------------------------------------------------
>
>                 Key: JS-213
>                 URL: http://www.crosswire.org/bugs/browse/JS-213
>             Project: JSword
>          Issue Type: Bug
>          Components: o.c.jsword.book.filter.thml
>            Reporter: Martin Denham
>            Assignee: DM Smith
>            Priority: Minor
>         Attachments: ATag.java, ATagTest.java
>
>
> I believe there is some missing code in thml.ATag.  In StrongsRealGreek there are references like:
>    <a href="sword://StrongsRealGreek/01909">1909</a>
> and the above is currently converted to OSIS as:
>    <reference>1909</reference>
> However I think it should be:
>    <reference osisRef="sword://StrongsRealGreek/01909">1909</reference>
> Joe has left the following comment in ATag which seems to confirm that some code is missing:
>    // LATER(joe): put the correct reference here
> I added the following just before Joe's comment which seems to fix the problem:
>         String href = attrs.getValue("href");
>         if (href!=null && !href.isEmpty()) {
>             reference.setAttribute(OSISUtil.OSIS_ATTR_REF, href);
>         }
> I will attach the amended ATag.java and also a junit test.  If nobody comments adversely before next week then I can check in the junit and fixed code next week.
> There is probably also an issue with xml like "<a name="01993">1993</a>" which is not addressed by the attached fix.

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