[ZOOM] question on ISBN queries...

Mike Taylor mike at miketaylor.org.uk
Fri Apr 30 16:24:21 CEST 2010


On 30 April 2010 14:58, Matt ANDERSON <manderson159 at insightbb.com> wrote:
> I have a question about PQN/PQF for z39.50 query calls.  I'm building a
> website for my kid's school and I want to call the local library to see if
> they have books on the school's reading list.  The library wants me to use
> their z39.50 API.  So I have a list of ISBNs for each book on the list and
> I'd like to be able to query the library for each book but don't want to
> make a seperate query call for each ISBN.  I was hoping to be able to query
> all the ISBNs together and get back a list of results that matched the ISBNs
> in the query.  For example:
>
> Book 1 has 3 ISBNS (ISBN1, ISBN2, ISBN3)
>
> query string = @or @or @attr 1=7 ISBN1 @attr 1=7 ISBN2 @attr 1=7 ISBN3
>
> but this just gets me back a single record.  What I'm looking for response
> back that includes a record for each ISBN that is in the library's db, so if
> ISBN2 is not in the public library, I should get 2 records back.  How should
> the query be structured so I can get back a list of records that are found
> via the ISBNs in the query?

Your query is correct -- it should do exactly what you intend.

(Although you can make it cleaner by factoring the @attr 1=7 out, like so:
@attr 1=7 @or @or ISBN1 ISBN2 ISBN3
this is semantically equivalent to your version, and will be sent the
same on the wire.)

If you're only getting back a single record, it's probably exactly
what it seems: the library only has one of the three books you
searched for.  You can verify that by search for each one
individually.



More information about the ZOOM mailing list