projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix SRW/SRU NS for diagnostic
[yaz-moved-to-github.git]
/
src
/
srw.c
diff --git
a/src/srw.c
b/src/srw.c
index
3f39cf3
..
5627335
100644
(file)
--- a/
src/srw.c
+++ b/
src/srw.c
@@
-2,7
+2,7
@@
* Copyright (c) 2002-2003, Index Data.
* See the file LICENSE for details.
*
* Copyright (c) 2002-2003, Index Data.
* See the file LICENSE for details.
*
- * $Id: srw.c,v 1.3 2003-12-20 00:51:19 adam Exp $
+ * $Id: srw.c,v 1.6 2003-12-22 22:47:20 adam Exp $
*/
#include <yaz/srw.h>
*/
#include <yaz/srw.h>
@@
-302,9
+302,11
@@
static int yaz_srw_diagnostics(ODR o, xmlNodePtr pptr, Z_SRW_diagnostic **recs,
else if (o->direction == ODR_ENCODE)
{
int i;
else if (o->direction == ODR_ENCODE)
{
int i;
+ xmlNsPtr ns_diag =
+ xmlNewNs(pptr, "http://www.loc.gov/zing/srw/diagnostics/", "diag");
for (i = 0; i < *num; i++)
{
for (i = 0; i < *num; i++)
{
- xmlNodePtr rptr = xmlNewChild(pptr, 0, "diagnostic", 0);
+ xmlNodePtr rptr = xmlNewChild(pptr, ns_diag, "diagnostic", 0);
add_xsd_integer(rptr, "code", (*recs)[i].code);
add_xsd_string(rptr, "details", (*recs)[i].details);
}
add_xsd_integer(rptr, "code", (*recs)[i].code);
add_xsd_string(rptr, "details", (*recs)[i].details);
}
@@
-437,6
+439,7
@@
int yaz_srw_codec(ODR o, void * vptr, Z_SRW_PDU **handler_data,
(*p)->which = Z_SRW_explain_request;
req = (*p)->u.explain_request = odr_malloc(o, sizeof(*req));
req->recordPacking = 0;
(*p)->which = Z_SRW_explain_request;
req = (*p)->u.explain_request = odr_malloc(o, sizeof(*req));
req->recordPacking = 0;
+ req->database = 0;
for (; ptr; ptr = ptr->next)
{
if (match_xsd_string(ptr, "recordPacking", o,
for (; ptr; ptr = ptr->next)
{
if (match_xsd_string(ptr, "recordPacking", o,
@@
-613,6
+616,9
@@
Z_SRW_PDU *yaz_srw_get(ODR o, int which)
odr_malloc(o, sizeof(*sr->u.explain_response));
sr->u.explain_response->record.recordData_buf = 0;
sr->u.explain_response->record.recordData_len = 0;
odr_malloc(o, sizeof(*sr->u.explain_response));
sr->u.explain_response->record.recordData_buf = 0;
sr->u.explain_response->record.recordData_len = 0;
+ sr->u.explain_response->record.recordSchema = 0;
+ sr->u.explain_response->record.recordPosition = 0;
+ sr->u.explain_response->record.recordPacking = Z_SRW_recordPacking_string;
}
return sr;
}
}
return sr;
}