<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Yiguang,<br>
<br>
I have updated APIExamples.java to show how to do a ranked search (see
rankSearch), and how to iterate over the results of a search and get
the text for the verses. You will see examples of how to iterate over
verses (see export) and over ranges of verses (see searchAndShow). In
one of the examples you will see how you can provide your own xslt,
which you will need to do.<br>
<br>
It may take a bit to show up on the web at
<pre wrap=""><a
 href="http://crosswire.org/jsword/java2html/org/crosswire/jsword/examples/APIExamples.java.html">http://crosswire.org/jsword/java2html/org/crosswire/jsword/examples/APIExamples.java.html</a></pre>
, but you can get to it in CVS.<br>
<br>
Hope this helps.<br>
<br>
In His Service,<br>
&nbsp;&nbsp;&nbsp; DM<br>
<br>
Yiguang Hu wrote:
<blockquote cite="mid20050914033855.58952.qmail@web54314.mail.yahoo.com"
 type="cite">
  <pre wrap="">Thanks for your reply Mark. I already received a
response from Troy on the sword team and he showed me
their web with the c++ version sword engine. 
<a class="moz-txt-link-freetext" href="http://crosswire.org/study/parallelstudy.jsp?add=ChiNCVs&add=WHNU&add=NASB">http://crosswire.org/study/parallelstudy.jsp?add=ChiNCVs&amp;add=WHNU&amp;add=NASB</a>
They use idl to work with sword and also thinking of
implementing the same idl to work with the jsword.
So I am still thinking how I can contribute so it
could be useful yet not duplicate what Troy already
got.

I'd like to play the ajax a bit first. It does sound
great. 
I looked at the Key but I am not sure how to iterate
effectively. I was thinking  a small wrapper for the
key that return me the plaintext or the html for a
given key. I iterate and create a wrapper object for
each key and put the wrapper into a list. When I
display, I call the wrapper method to return text or
html. If your way is better, would you please add your
iterate into the APIExample page ?
Thanks
Yiguang

--- DM Smith <a class="moz-txt-link-rfc2396E" href="mailto:dmsmith555@yahoo.com">&lt;dmsmith555@yahoo.com&gt;</a> wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">Welcome Yiguang!

Your work does not overlap ours and is most
welcomed.

I don't know any way to easily search the mailing
list archives except 
via google. Just include jsword-devel in your
search.

We don't actually return the text of verses as the
result of a search 
but a list of references to verses. At first this
might seem like a 
drawback. It is a huge resource savings as you have
a lot of control 
over how verses are fetched.

The search result will be a Key object which can be
iterated over. Key 
has a very list like interface. You can get an
iterator, the number of 
elements or a particular element by position. The
elements returned from 
the iteration are references to verses. You have a
choice as to what 
kind of Key to use. Typically it will be a
PassageTally or a BitwisePassage.

You can subset the Key into other keys so that you
can return partial 
results (e.g. pages with 50 verses on them)

 From a key you can request the text or an xsl
transformation of the 
text. The xslt that we use within BibleDesktop
creates HTML with custom 
protocols. I think that changing that would be make
it work for the web.

You can see examples of most of this at 

    </pre>
  </blockquote>
  <pre wrap=""><!----><a class="moz-txt-link-freetext" href="http://crosswire.org/jsword/java2html/org/crosswire/jsword/examples/APIExamples.java.html">http://crosswire.org/jsword/java2html/org/crosswire/jsword/examples/APIExamples.java.html</a>.
  </pre>
  <blockquote type="cite">
    <pre wrap="">It does not have examples of how to iterate, but I
can add those if you ask.

In the context of a web, you might want to look at
ways to keep from 
refreshing the entire page with each request. Joe
has been working on 
DWR (<a class="moz-txt-link-freetext" href="http://getahead.ltd.uk/dwr/">http://getahead.ltd.uk/dwr/</a>), which is AJAX for
Java made easy and 
it has just gone 1.0. This may be of use in making a
website experience 
very enjoyable.

Hope this is a good start. Looking forward to seeing
your website!
    DM

Yiguang Hu wrote:

    </pre>
    <blockquote type="cite">
      <pre wrap="">Hello,

My name is Yiguang Hu. I am the webmaster of
ccim.org-A volunteer supportted Chinese Christian
Internet Mission. We host many Chinese Church/Orgs
      </pre>
    </blockquote>
    <pre wrap="">web
    </pre>
    <blockquote type="cite">
      <pre wrap="">sites and have a bible search engine and a
      </pre>
    </blockquote>
    <pre wrap="">E-library 
    </pre>
    <blockquote type="cite">
      <pre wrap="">and have several Chinese Christian web sites in/out
      </pre>
    </blockquote>
    <pre wrap="">of
    </pre>
    <blockquote type="cite">
      <pre wrap="">USA. 
I just found the jsword project a few days ago and
      </pre>
    </blockquote>
    <pre wrap="">it
    </pre>
    <blockquote type="cite">
      <pre wrap="">is what I have been waiting for quite some time. I
played a little bit of the source code and wrote a
      </pre>
    </blockquote>
    <pre wrap="">web
    </pre>
    <blockquote type="cite">
      <pre wrap="">interface using java server faces. I got the
bible/dictionary/commentary works with some search
result problems. 
Because I just started, I may not be using the
search function correctly. 
Before I spend more time on it, I am just wondering
      </pre>
    </blockquote>
    <pre wrap="">if
    </pre>
    <blockquote type="cite">
      <pre wrap="">some one already started a web front effort. I will
      </pre>
    </blockquote>
    <pre wrap="">be
    </pre>
    <blockquote type="cite">
      <pre wrap="">very glad to add my code into the CVS so more
      </pre>
    </blockquote>
    <pre wrap="">people
    </pre>
    <blockquote type="cite">
      <pre wrap="">can help to improve it. 

The other question is is there a interface that put
the 
search result in a collection of verses like a List
      </pre>
    </blockquote>
    <pre wrap="">so
    </pre>
    <blockquote type="cite">
      <pre wrap="">I can display them like 20 verses/entry a page ?

One more question is Is there a way I can search
      </pre>
    </blockquote>
    <pre wrap="">the
    </pre>
    <blockquote type="cite">
      <pre wrap="">email archives instead of read the archive files
      </pre>
    </blockquote>
    <pre wrap="">one
    </pre>
    <blockquote type="cite">
      <pre wrap="">by one so I can find if my question is already
answered or a duplicate ?


Thank you very much for this great work.
Yiguang

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam
      </pre>
    </blockquote>
    <pre wrap="">protection around 
    </pre>
    <blockquote type="cite">
      <pre wrap=""><a class="moz-txt-link-freetext" href="http://mail.yahoo.com">http://mail.yahoo.com</a> 
_______________________________________________
jsword-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:jsword-devel@crosswire.org">jsword-devel@crosswire.org</a>
      </pre>
    </blockquote>
    <pre wrap=""><a class="moz-txt-link-freetext" href="http://www.crosswire.org/mailman/listinfo/jsword-devel">http://www.crosswire.org/mailman/listinfo/jsword-devel</a>
    </pre>
    <blockquote type="cite">
      <pre wrap=""> 

      </pre>
    </blockquote>
  </blockquote>
  <pre wrap=""><!---->

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
<a class="moz-txt-link-freetext" href="http://mail.yahoo.com">http://mail.yahoo.com</a> 

  </pre>
</blockquote>
</body>
</html>