-$Id: Changes,v 1.24 2006-04-19 12:38:37 mike Exp $
+$Id: Changes,v 1.25 2006-07-21 22:14:05 mike Exp $
Revision history for Perl extension Net::Z3950::SimpleServer
yaz_rpnquery_to_wrbuf() used instead. This is more robust
in dealing with unusual cases such as string-valued
attributes.
+ - Support for SCHEMA element when fetching records.
1.01 Fri Mar 24 12:09:32 GMT 2006
- Documentation of release 1.00's SRU/SRW facilities.
##
##
-## $Id: SimpleServer.pm,v 1.27 2006-06-02 16:03:25 quinn Exp $
+## $Id: SimpleServer.pm,v 1.28 2006-07-21 22:14:19 mike Exp $
package Net::Z3950::SimpleServer;
OFFSET => nnn ## Record offset number
REQ_FORM => "n.m.k.l"## Client requested format OID
COMP => "xyz" ## Formatting instructions
+ SCHEMA => "abc" ## Requested schema, if any
## Handler response:
ERR_STR => "" ## Error string
SUR_FLAG => 0 ## Surrogate diagnostic flag
REP_FORM => "n.m.k.l"## Provided format OID
+ SCHEMA => "abc" ## Provided schema, if any
};
The REP_FORM value has by default the REQ_FORM value but can be set to
/*
- * $Id: SimpleServer.xs,v 1.48 2006-06-07 18:25:15 quinn Exp $
+ * $Id: SimpleServer.xs,v 1.49 2006-07-21 22:14:12 mike Exp $
* ----------------------------------------------------------------------
*
* Copyright (c) 2000-2004, Index Data.
SV *sur_flag;
SV *point;
SV *rep_form;
+ SV *schema;
char *ptr;
char *ODR_record;
char *ODR_basename;
rr->errcode = 0;
href = newHV();
hv_store(href, "SETNAME", 7, newSVpv(rr->setname, 0), 0);
+ if (rr->schema)
+ hv_store(href, "SCHEMA", 6, newSVpv(rr->schema, 0), 0);
temp = hv_store(href, "OFFSET", 6, newSViv(rr->number), 0);
if (rr->request_format_raw != 0) {
oid_dotted = oid2dotted(rr->request_format_raw);
temp = hv_fetch(href, "REP_FORM", 8, 1);
rep_form = newSVsv(*temp);
+ temp = hv_fetch(href, "SCHEMA", 8, 1);
+ schema = newSVsv(*temp);
+
temp = hv_fetch(href, "HANDLE", 6, 1);
point = newSVsv(*temp);
strcpy(ODR_basename, ptr);
rr->basename = ODR_basename;
+ ptr = SvPV(schema, length);
+ rr->schema = (char *)odr_malloc(rr->stream, length + 1);
+ strcpy(rr->schema, ptr);
+
ptr = SvPV(rep_form, length);
ODR_oid_buf = (int *)odr_malloc(rr->stream, (MAX_OID + 1) * sizeof(int));
if (dotted2oid(ptr, ODR_oid_buf) == -1) /* Maximum number of OID elements exceeded */
sv_free(err_code),
sv_free(sur_flag);
sv_free(rep_form);
+ sv_free(schema);
PUTBACK;
FREETMPS;