[jaws-uk] Re: Research it problem

  • From: "Jonathan Horniblow (Talking Newspaper Services)" <jonathan@xxxxxxxxxxxxxxxxxxxxxxxx>
  • To: jaws-uk@xxxxxxxxxxxxx
  • Date: Sun, 5 Sep 2010 09:05:10 +0100

If you get any luck with this, please let me know. I've been trying to
get a reply from Freedom Scientific for two weeks now about the
following...


I thought it would be good to get some ResearchIT integration, and
although the idea is to expand it from a simple search, I'm falling at
the first hurdle.

Consider the following two query results:

The one that ResearchIT successfully pulls results from:
http://en.wikipedia.org/w/api.php?action=opensearch&format=xml&search=jaws

And structurally identical, which ResearchIT finds no results from:
http://find.talking-newspapers.co.uk/jaws_search.php?addressInput=Reading

I took LRL_Wiktionary.qry, saved it as a new name with a renamed .rul
file, and all went smoothly with that.

I changed the following line in the file:
declare variable $URL :=
concat("http://en.wiktionary.org/w/api.php?action=opensearch&amp;search=";,
$search_term, "&amp;format=xml&amp;limit=1");
to
declare variable $URL :=
concat("http://find.talking-newspapers.co.uk/jaws_search.php?addressInput=";,
$search_term);

I then wrote a bit of SimpleXML to parse my search results into an xml
file, which, if you compare the source of the 2 results pages, looks
pretty identical to a DOM inspector.

But it never gets results.

Now what I don't quite understand is this line:
declare variable $result :=
xqilla:parse-html(unparsed-text(data($doc/wiki:SearchSuggestion//wiki:Item[1]/wiki:Url)));

Why the //wiki: parts? That doesn't appear as part of the xml.

And I also don't need xqilla to parse it as html - it's xml already.

So I just hacked away changing it to things like

declare variable $result :=
xqilla:parse-html(unparsed-text(data($doc/SearchSuggestion/Item[1]/Url)));
declare variable $result :=
xqilla:parse-html(unparsed-text(data($doc/SearchSuggestion/Section/Item/Text)));;
declare variable $result :=
xqilla:parse-html(unparsed-text(data($doc/wiki:SearchSuggestion//wiki:Item[1]/wiki:Url)));

and multiple variations there of until I got a headache at about midnight.

The ResearchIT API docs are comprehensive, but not that clear - more
examples would be great!


On 4 September 2010 23:53, ali kazi <prince_ali@xxxxxxxxxxxx> wrote:
> Hello,
>
> I am having a problem using research it. Wiktionary is set to primary,
> and when i press jaws key, windows and r on a word, most of the time it
> just says wiktionary searched for so-and-so and got no results. And they
> are definitely real words lol!
>
> Any ideas?
>
> Ali
> --
>  ali kazi
>  prince_ali@xxxxxxxxxxxx
>
> --
> http://www.fastmail.fm - Accessible with your email software
>                          or over the web
>
> ** To leave the list, click on the immediately-following link:-
> ** [mailto:jaws-uk-request@xxxxxxxxxxxxx?subject=unsubscribe]
> ** If this link doesn't work then send a message to:
> ** jaws-uk-request@xxxxxxxxxxxxx
> ** and in the Subject line type
> ** unsubscribe
> ** For other list commands such as vacation mode, click on the
> ** immediately-following link:-
> ** [mailto:jaws-uk-request@xxxxxxxxxxxxx?subject=faq]
> ** or send a message, to
> ** jaws-uk-request@xxxxxxxxxxxxx with the Subject:- faq
>
>
** To leave the list, click on the immediately-following link:-
** [mailto:jaws-uk-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** jaws-uk-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:jaws-uk-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to 
** jaws-uk-request@xxxxxxxxxxxxx with the Subject:- faq

Other related posts: