[jsword-devel] [JIRA] Commented: (JS-213) Missing code in thml.ATag causes missing osisRef attribute in reference
DM Smith (JIRA)
jira at crosswire.org
Sat Mar 17 12:23:05 MST 2012
[ http://www.crosswire.org/bugs/browse/JS-213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=24570#comment-24570 ]
DM Smith commented on JS-213:
-----------------------------
This looks ok.
Please note that JSword has no sword:// handler. That will be need to be added as well.
On sword-devel there has been some discussion as to how a module should refer to itself. And there has been some discussion as to how the sword:// protocol should be handled and understood. I'm guessing that this module and it's encoding is perhaps proprietary to Xiphos and its repository and that SWORD lib does not handle it. (e.g. does The SWORD Project for Windows handle it? That project is the canonical definition of what the SWORD lib defines.)
It probably would be better for this to rewrite this reference as something that JSword currently recognizes (or add a sword:// protocol handler). That is one-off code that sees sword://StrongsReal[Greek|Hebrew]/xxx and converts it to an <a> tag akin to what the xlst outputs for strongs for a <w> tag. IIRC it is some thing like strong://[GH]xxx.
> 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