[jsword-devel] Strongs Dictionary in beta

trent.jsword at trentonadams.ca trent.jsword at trentonadams.ca
Sun Feb 28 10:49:14 MST 2010


----- "trent jsword" <trent.jsword at trentonadams.ca> wrote:

> From: "trent jsword" <trent.jsword at trentonadams.ca>
> To: "DM Smith" <dmsmith at crosswire.org>
> Cc: "J-Sword Developers Mailing List" <jsword-devel at crosswire.org>
> Sent: Sunday, February 28, 2010 10:21:55 AM GMT -06:00 US/Canada Central
> Subject: Re: [jsword-devel] Strongs Dictionary in beta

> >
> > It would be more reasonable for JSword to make the title a search
> for
> > the keyword. In he case of Strong's dictionary it would use the
> syntax
> > above. For any other dictionary, it would be just a regular search.
> 
> Right, okay, that would be good.  I don't see where I can make the
> item searchable though.  I'm assuming just a link with some special
> format?  You mentioned "Note Search" but I've searched the code to no
> avail.  Perhaps I'm not using the proper search to find it. :P

Oh, it looks like I would need to add another protocol?  perhaps "search"?  Is that right?


> > >
> > > Also, I just realized, while I do that, it may be worth my time to
> > fix the simple.xsl to output links to other strongs numbers as well.
> > Does
> >
> > Your email didn't finish your thought. One of the ideas about a
> > dictionary is that the common "See also" references should be
> > hyperlinked. The module should be marked up for this. JSword will
> need
> > some work to handle it.
> 
> Yes, that's what I'm referring to.  The data is there, it's just not
> used yet.  I think it would be just a modification to the simple.xsl
> (I think).

Okay, I'll have to find the XML of the greek/hebrew dictionaries in the main repo.  The following works with the ones in the beta repo, but not the main ones.  I'll see if I can come up with something that works for both.

  <xsl:template match="ref">
    <xsl:if test="starts-with(@target, 'Strong:')">
      <xsl:variable name="sref" select="substring-after(@target, 'Strong:')"/>
      <xsl:variable name="sproto">
        <xsl:choose>
          <xsl:when test="starts-with($sref, 'H')">hdef:</xsl:when>
          <xsl:otherwise>gdef:</xsl:otherwise>
        </xsl:choose>
      </xsl:variable>
      <a>
        <xsl:attribute name="href">
          <xsl:value-of select="$sproto"/><xsl:value-of select="$sref"/>
        </xsl:attribute>
        <xsl:value-of select="$sref"/>
      </a>
    </xsl:if>
  </xsl:template>

p.s.
How would one "go back" to the previous strongs number, after they've clicked the link?  The link works, but the back button in the toolbar doesn't work for the dictionary books apparently.



More information about the jsword-devel mailing list