X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=doc%2Fbook.xml;h=bb99baa4b0e9290cd5e17108654fae8f35f02a4e;hb=7207680c8f685c9ed33536bfd4a4878cb2616d99;hp=b812fc013cc1ab55861f24f15f6e0058ae6fcfc1;hpb=11ed1645174d8ca8d8dcf5ef2bbe91e70a4a3e00;p=yaz-moved-to-github.git
diff --git a/doc/book.xml b/doc/book.xml
index b812fc0..bb99baa 100644
--- a/doc/book.xml
+++ b/doc/book.xml
@@ -78,7 +78,7 @@
Supports
- Solr Web Service version 1.4.x
+ Apache Solr Web Service version 1.4.x
(client side only)
@@ -138,14 +138,14 @@
Reading this Manual
Most implementors only need to read a fraction of the
- material in thie manual, so a quick walkthrough of the chapters
+ material in this manual, so a quick walkthrough of the chapters
is in order.
contains installation
- instructions for &yaz;. You don't need reading this
+ instructions for &yaz;. You don't need to read this
if you expect to download &yaz; binaries.
However, the chapter contains information about how
to make your application link
@@ -155,7 +155,7 @@
describes the ZOOM API of &yaz;.
- This is definitely worth a read if you wish to develop a Z39.50/SRU
+ This is definitely worth reading if you wish to develop a Z39.50/SRU
client.
@@ -169,7 +169,7 @@
describes how to use the &yaz; Z39.50
- client. If you're developer and wish to test your server
+ client. If you're a developer and wish to test your server
or a server from another party, you might find this chapter
useful.
@@ -202,7 +202,7 @@
goes through the details of the
ODR module which is the work horse that encodes and decodes
BER packages. Implementors using ZOOM only, do not
- need reading this.
+ need to read this.
Most other Z39.50 implementors only need to read the first two
sections ( and
).
@@ -244,7 +244,7 @@
level APIs of &yaz;.
- The YAZ toolkit modules is shown in figure .
+ The YAZ toolkit modules are shown in figure .
@@ -627,7 +627,7 @@
prefix.
Use this option if you want XSLT and XML support.
By default, configure will
- search for libxslt on the system. Use this option if it
+ search for libxslt on the system. Use this option if
libxslt is not found automatically. Alternatively,
--without-xslt, can be used to force &yaz;
not to use libxslt.
@@ -644,7 +644,7 @@
prefix.
Use this option if you want &yaz; to use XML and support SRU/Solr.
By default, configure will
- search for libxml2 on the system. Use this option if it
+ search for libxml2 on the system. Use this option if
libxml2 is not found automatically. Alternatively,
--without-xml2, can be used to force &yaz;
not to use libxml2.
@@ -857,7 +857,7 @@
This section describes how to compile - and link your own
applications using the &yaz; toolkit.
If you're used to Makefiles this shouldn't be hard. As for
- other libraries you have used before, you have to set a proper include
+ other libraries you have used before, you need to set a proper include
path for your C/C++ compiler and specify the location of
&yaz; libraries. You can do it by hand, but generally we suggest
you use the yaz-config that is generated
@@ -1026,7 +1026,7 @@
- libxslt depends libxml2.
+ libxslt depends on libxml2.
@@ -1138,7 +1138,7 @@
bin/yaz-icu.exeThis program exposes the ICU wrapper library if that
is enabled for YAZ. Only if ICU is available this program is
- build.
+ built.
@@ -1154,7 +1154,7 @@
bin/zoomtst1.exe,
bin/zoomtst2.exe, ..
- Several small applications that demonstrates the ZOOM API.
+ Several small applications that demonstrate the ZOOM API.
@@ -1221,14 +1221,21 @@
nmake install
+
+
+ There's an error in configure.js for Libxml2 2.9.2.
+ Line 17 should be assigned to configure.ac
+ rather than configure.in.
+
+
For Libxslt it is similar. We must ensure that compilation of
Libxslt links against the already installed libxml2.
cd win32
cscript configure.js prefix=c:\libxslt-1.1.28.win32 iconv=no \
- lib=c:\libxmlt-2.9.2.win32\lib \
- include=c:\libxmlt-2.9.2.win32\include\libxml2
+ lib=c:\libxml2-2.9.2.win32\lib \
+ include=c:\libxml2-2.9.2.win32\include\libxml2
nmake
nmake install
@@ -1290,7 +1297,8 @@
and more apparent over time. So when the first &zoom; specification
became available,
an implementation for &yaz; was quickly developed. For the first time, it is
- now as easy (or easier!) to develop clients than servers with &yaz;. This
+ now as easy (or easier!) to develop clients as it is to develop
+ servers with &yaz;. This
chapter describes the &zoom; C binding. Before going further, please
reconsider whether C is the right programming language for the job.
There are other language bindings available for &yaz;, and still
@@ -1309,7 +1317,7 @@
The C language misses features found in object oriented languages
such as C++, Java, etc. For example, you'll have to manually,
destroy all objects you create, even though you may think of them as
- temporary. Most objects has a _create - and a
+ temporary. Most objects have a _create - and a
_destroy variant.
All objects are in fact pointers to internal stuff, but you don't see
that because of typedefs. All destroy methods should gracefully ignore a
@@ -1354,7 +1362,7 @@
You can prefix the host with a scheme followed by colon. The
default scheme is tcp (Z39.50 protocol).
The scheme http selects SRU/get over HTTP by default,
- but can overridded to use SRU/post, SRW and the Solr protocol.
+ but can overridden to use SRU/post, SRW, and the Solr protocol.
You can prefix the scheme-qualified host-string with one or more
@@ -1442,7 +1450,7 @@
clientIPClient IP. If set, is
encoded in the otherInfo area of a Z39.50 PDU with OID
1.2.840.10003.10.1000.81.3. Holds the original IP addreses
- of a client. Is used of ZOOM is used in a gateway of some sort.
+ of a client. Is used if ZOOM is used in a gateway of some sort.
none
asyncIf true (1) the connection operates in
@@ -1481,7 +1489,7 @@
none
databaseNameOne or more database names
- separated by character plus (+), which to
+ separated by character plus (+), which is to
be used by subsequent search requests on this Connection.
Default
@@ -1498,7 +1506,7 @@
1
mediumSetPresentNumberThis value represents
- the number of records to be returned as part of a search when when
+ the number of records to be returned as part of a search when
hits is less than or equal to large set lower bound and if hits
is greater than small set upper bound.
0
@@ -1508,7 +1516,7 @@
none
mediumSetElementSetName
- The element set name to be for medium-sized result sets.
+ The element set name to be used for medium-sized result sets.
none
init_opt_search, init_opt_present, init_opt_delSet, etc.
@@ -1525,14 +1533,19 @@
sru_version
SRU/SRW version. Should be 1.1, or
- 1.2. This is , prior to connect, the version
+ 1.2. This is, prior to connect, the version
to offer (highest version). And following connect (in fact
first operation), holds the negotiated version with the server
(same or lower version).
1.2
+
+ extraArgs
+ Extra arguments for SRU/Solr URLs. The value must be
+ URL encoded already.
+
facets
- Requested or recommend facets may be given before a search is sent.
+ Requested or recommended facets may be given before a search is sent.
The value of this setting is described in
For inspection of the facets returned, refer to the functions
described in .
@@ -1592,9 +1605,9 @@
redis support is available for YAZ 5.2.0 or later. If this
option is supplied for an earlier version of YAZ, it is
ignored.
- The value of this option is a set options, similar to that
+ The value of this option is a set of options, similar to that
of the memcached setting. At this stage only --server=host[:port]
- and --expire=seconds is supported.
+ and --expire=seconds are supported.
none
@@ -1628,7 +1641,7 @@
The calls ZOOM_connection_new and
ZOOM_connection_connect establishes a TCP/IP
connection and sends an Initialize Request to the target if
- possible. In addition, the calls waits for an Initialize Response
+ possible. In addition, the calls wait for an Initialize Response
from the target and the result is inspected (OK or rejected).
@@ -1664,7 +1677,7 @@
SRU/Solr Protocol behavior
- The HTTP based protocols (SRU, SRW, Solr) doesn't feature an
+ The HTTP based protocols (SRU, SRW, Solr) do not feature an
Inititialize Request, so the connection phase merely establishes a
TCP/IP connection with the HTTP server.
@@ -1730,7 +1743,7 @@
ZOOM_query_sortby2 is similar to
ZOOM_query_sortby but allows a strategy for
sorting. The reason for the strategy parameter is that some
- protocols offers multiple ways of performing sorting.
+ protocols offer multiple ways of performing sorting.
For example, Z39.50 has the standard sort, which is performed after
search on an existing result set.
It's also possible to use CQL in Z39.50 as the query type and use
@@ -1786,10 +1799,10 @@
Function ZOOM_connection_search creates
- a result set given a connection and query.
+ a result set, given a connection and query.
Destroy a result set by calling
ZOOM_resultset_destroy.
- Simple clients may using PQF only may use function
+ Simple clients using PQF only, may use the function
ZOOM_connection_search_pqf in which case
creating query objects is not necessary.
@@ -1808,7 +1821,7 @@
and ZOOM_connection_option_set.
- The number of hits also called result-count is returned by
+ The number of hits, also called result-count, is returned by
function ZOOM_resultset_size.
searchresult.size
- number of search result entries. This option is-nonexistant
+ number of search result entries. This option is non-existent
if no entries are returned by the server.
@@ -1949,7 +1962,7 @@
ZOOM_resultset_sort and
ZOOM_resultset_sort1 both sort an existing
- result-set. The sort_type parameter is not use. Set it to "yaz".
+ result-set. The sort_type parameter is not used. Set it to "yaz".
The sort_spec is same notation as ZOOM_query_sortby and identical
to that offered by yaz-client's
sort command.
@@ -1992,7 +2005,7 @@
The high-level mode allows you to fetch a range of records from
the result set with a given start offset. When you use this mode
the client will automatically use piggyback if that is possible
- with the target and perform one or more present requests as needed.
+ with the target, and perform one or more present requests as needed.
Even if the target returns fewer records as part of a present response
because of a record size limit, etc. the client will repeat sending
present requests. As an example, if option start
@@ -2018,7 +2031,7 @@
Current version of &yaz; does not take advantage of a result set id
returned by the SRU server. Future versions might do, however.
- Since, the ZOOM driver does not save result set IDs any
+ Since the ZOOM driver does not save result set IDs, any
present (retrieval) is transformed to a SRU SearchRetrieveRequest
with same query but, possibly, different offsets.
@@ -2046,10 +2059,10 @@
SRU SearchRetrieveRequest.
- Solr queries has to be done in Solr query format.
+ Solr queries need to be done in Solr query format.
- Unfortunately, SRU or Solr does not define a database setting. Hence,
+ Unfortunately, SRU and Solr do not define a database setting. Hence,
databaseName is unsupported and ignored.
However, the path part in host parameter for functions
ZOOM_connecton_new and
@@ -2107,12 +2120,12 @@
Function ZOOM_resultset_records retrieves
a number of records from a result set. Parameter start
and count specifies the range of records to
- be returned. Upon completion array
+ be returned. Upon completion, the array
recs[0], ..recs[count-1]
holds record objects for the records. The array of records
recs should be allocated prior the call
ZOOM_resultset_records. Note that for those
- records that couldn't be retrieved from the target
+ records that couldn't be retrieved from the target,
recs[ ..] is set to NULL.
@@ -2126,28 +2139,37 @@
The type is a string of the format:
- format[;charset=from[/opacfrom][,to]][;format=v]
+ format[;charset=from[/opacfrom][,to]][;format=v][;base64=xpath]
- where format specifies the format of the
- returned record, from
+ If charset is given, then from
specifies the character set of the record in its original form
(as returned by the server), to specifies
- the output (returned)
- character set encoding.
- If to is omitted UTF-8 is assumed.
+ the output (returned) character set encoding.
+ If to is omitted, then UTF-8 is assumed.
If charset is not given, then no character set conversion takes place.
-
-
- OPAC records may be returned in a different
- set from the bibliographic MARC record. If this is this the case,
+ OPAC records may be returned in a different
+ set from the bibliographic MARC record. If this is this the case,
opacfrom should be set to the character set
of the OPAC record part.
+
+
+ The format is generic but can only be used to
+ specify XML indentation when the value v
+ is 1 (format=1).
+
+
+ The base64 allows a full record to be extracted
+ from base64-encoded string in an XML document.
+
Specifying the OPAC record character set requires YAZ 4.1.5 or later.
+
+ Specifying the base64 parameter requires YAZ 4.2.35 or later.
+
The format argument controls whether record data should be XML
@@ -2164,7 +2186,7 @@
The following are the supported values for form.
database
- Database of record is returned
+ The Database of the record is returned
as a C null-terminated string. Return type
const char *.
@@ -2185,7 +2207,7 @@
renderThe record is returned in a display friendly
- format. Upon completion buffer is returned
+ format. Upon completion, buffer is returned
(type const char *) and length is stored in
*len.
@@ -2264,7 +2286,7 @@
Present.
The functions may block (and perform network I/O) - even though option
async is 1, because they return records objects.
- (and there's no way to return records objects without retrieving them!).
+ (And there's no way to return records objects without retrieving them!)
There is a trick, however, in the usage of function
@@ -2335,13 +2357,13 @@
An array of facets field can be returned by
ZOOM_resultset_facets. The length of the array is
given by ZOOM_resultset_facets_size. The array is
- zero-based and last entry will be at
+ zero-based and the last entry will be at
ZOOM_resultset_facets_size(result_set)-1.
It is possible to interate over facets by name, by calling
ZOOM_resultset_facets_names.
- This will return an const array of char * where each string can be used
+ This will return a const array of char * where each string can be used
as parameter for ZOOM_resultset_get_facet_field.
@@ -2400,7 +2422,7 @@
startpqf.
If the operation was successful, the size of the scan set can be
retrieved by a call to ZOOM_scanset_size.
- Like result sets, the items are numbered 0,..size-1.
+ Like result sets, the items are numbered 0..size-1.
To obtain information about a particular scan term, call function
ZOOM_scanset_term. This function takes
a scan set offset pos and returns a pointer
@@ -2520,10 +2542,10 @@
- To create an extended service operation a ZOOM_package
+ To create an extended service operation, a ZOOM_package
must be created. The operation is a five step operation. The
package is created, package is configured by means of options,
- the package is send, result is inspected (by means of options),
+ the package is sent, result is inspected (by means of options),
the package is destroyed.
@@ -2554,6 +2576,37 @@
The type specifies the actual extended service
package type to be sent.
+
+ Extended Service Type
+
+
+
+
+
+ Type
+ Description
+
+
+
+
+ itemorderItem Order
+
+
+ updateRecord Update
+
+
+ createDatabase Create
+
+
+ dropDatabase Drop
+
+
+ commitCommit Operation
+
+
+
+
+
Extended Service Common Options
@@ -2571,12 +2624,12 @@
package-nameExtended Service Request package name. Must be specified
- as part of a request
+ as part of a request.
noneuser-id
- User ID of Extended Service Package. Is a request option
+ User ID of Extended Service Package. Is a request option.none
@@ -2611,7 +2664,8 @@
Item Order
- For Item Order, type must be set to itemorder in
+ For Item Order, type must be set to
+ itemorder in
ZOOM_package_send.
@@ -2645,6 +2699,11 @@
none
+ itemorder-setname
+ Name of result set for record
+ default
+
+ itemorder-itemPosition for item (record) requested. An integer1
@@ -2652,11 +2711,113 @@
+
+ There are two variants of item order: ILL-variant and
+ XML document variant. In order to use the XML variant the setting
+ doc must hold the XML item order document. If that
+ setting is unset, the ILL-variant is used.
+
+
+
Record Update
- For Record Update, type must be set to update in
+ For Record Update, type must be set to
+ update in
ZOOM_package_send.
@@ -2708,7 +2869,7 @@
Option recordOpaque is an alternative
to record - and record option (above) is
ignored if recordOpaque is set. This option is only available in
- YAZ 3.0.35 and later and is meant to facilitate Updates with
+ YAZ 3.0.35 and later, and is meant to facilitate Updates with
servers from OCLC.
none
@@ -2762,7 +2923,8 @@
Database Create
- For Database Create, type must be set to create in
+ For Database Create, type must be set to
+ create in
ZOOM_package_send.
@@ -2792,7 +2954,8 @@
Database Drop
- For Database Drop, type must be set to drop in
+ For Database Drop, type must be set to
+ drop in
ZOOM_package_send.
@@ -2821,7 +2984,8 @@
Commit Operation
- For Commit, type must be set to commit in
+ For Commit, type must be set to
+ commit in
ZOOM_package_send.
@@ -2832,7 +2996,7 @@
- The database create, drop and commit services are privately defined
+ The database create, drop, and commit services are privately defined
operations.
Refer to esadmin.asn in YAZ for the ASN.1
definitions.
@@ -2844,7 +3008,7 @@
Options
Most &zoom; objects provide a way to specify options to change behavior.
- From an implementation point of view a set of options is just like
+ From an implementation point of view, a set of options is just like
an associative array / hash.
@@ -2884,12 +3048,12 @@
ZOOM_query_cql2rpn translates the CQL string,
client-side, into RPN which may be passed to the server.
- This is useful for server's that don't themselves
+ This is useful for servers that don't themselves
support CQL, for which ZOOM_query_cql is useless.
- `conn' is used only as a place to stash diagnostics if compilation
+ 'conn' is used only as a place to stash diagnostics if compilation
fails; if this information is not needed, a null pointer may be used.
The CQL conversion is driven by option cqlfile from
- connection conn. This specifies a conversion file (eg pqf.properties)
+ connection conn. This specifies a conversion file (e.g. pqf.properties)
which must be present.
@@ -2897,8 +3061,8 @@
client-side, into RPN which may be passed to the server.
The conversion is driven by the specification given by
config. Upon completion 0 is returned on success; -1
- is returned on on failure. Om failure error_string and
- error_pos holds error message and position of
+ is returned on failure. On failure error_string and
+ error_pos hold the error message and position of
first error in original CCL string.
@@ -2915,18 +3079,18 @@
a number of connections. Supply the number of connections in
no and an array of connections in
cs (cs[0] ... cs[no-1]).
- A pending event could be a sending a search, receiving a response,
+ A pending event could be sending a search, receiving a response,
etc.
When an event has occurred for one of the connections, this function
returns a positive integer n denoting that an event
occurred for connection cs[n-1].
When no events are pending for the connections, a value of zero is
returned.
- To ensure that all outstanding requests are performed call this function
+ To ensure that all outstanding requests are performed, call this function
repeatedly until zero is returned.
- If ZOOM_event returns and returns non-zero, the
+ If ZOOM_event returns, and returns non-zero, the
last event that occurred can be expected.
@@ -2963,7 +3127,7 @@
ZOOM_EVENT_RECV_DATA
- Data has been received)
+ Data has been receivedZOOM_EVENT_TIMEOUT
@@ -2987,7 +3151,7 @@
ZOOM_EVENT_RECV_SEARCH
- A search result been received
+ A search result has been received
@@ -3007,7 +3171,7 @@
If you have a database system that you would like to make available by
- means of Z39.50 or SRU, &yaz; basically offers your two options. You
+ means of Z39.50 or SRU, &yaz; basically offers two options. You
can use the APIs provided by the &asn;, &odr;, and &comstack;
modules to
create and decode PDUs, and exchange them with a client.
@@ -3152,8 +3316,8 @@ int statserv_main(int argc, char **argv,
A boolean value, which determines whether the server
will fork on each incoming request (TRUE), or not (FALSE). Default is
- TRUE. This flag is only read by UNIX-based servers (WIN32 based servers
- doesn't fork).
+ TRUE. This flag is only read by UNIX-based servers (WIN32-based servers
+ do not fork).
@@ -3170,7 +3334,7 @@ int statserv_main(int argc, char **argv,
int inetd
A boolean value, which determines whether the server
- will operates under a UNIX INET daemon (inetd). Default is FALSE.
+ will operate under a UNIX INET daemon (inetd). Default is FALSE.
@@ -3235,12 +3399,12 @@ int statserv_main(int argc, char **argv,
Pointer to function which is called after the
command line options have been parsed - but before the server
starts listening.
- For forked UNIX servers this handler is called in the mother
- process; for threaded servers this handler is called in the
+ For forked UNIX servers, this handler is called in the mother
+ process; for threaded servers, this handler is called in the
main thread.
The default value of this pointer is NULL in which case it
isn't invoked by the frontend server.
- When the server operates as an NT service this handler is called
+ When the server operates as an NT service, this handler is called
whenever the service is started.
@@ -3251,7 +3415,7 @@ int statserv_main(int argc, char **argv,
Pointer to function which is called whenever the server
has stopped listening for incoming connections. This function pointer
has a default value of NULL in which case it isn't called.
- When the server operates as an NT service this handler is called
+ When the server operates as an NT service, this handler is called
whenever the service is stopped.
@@ -3267,14 +3431,14 @@ int statserv_main(int argc, char **argv,
The pointer returned by statserv_getcontrol points to
a static area. You are allowed to change the contents of the structure,
- but the changes will not take effect before you call
+ but the changes will not take effect until you call
void statserv_setcontrol(statserv_options_block *block);
- that you should generally update this structure before calling
+ You should generally update this structure before calling
statserv_main().
@@ -3306,7 +3470,7 @@ bend_initresult (*bend_init)(bend_initrequest *r);
Unlike previous versions of YAZ, the bend_init also
serves as a handler that defines the Z39.50 services that the backend
- wish to support. Pointers to all service handlers,
+ intends to support. Pointers to all service handlers,
including search - and fetch must be specified here in this handler.
@@ -3412,7 +3576,7 @@ typedef struct bend_initresult
The auth member holds the authentication information
- part of the Z39.50 Initialize Request. Interpret this if your serves
+ part of the Z39.50 Initialize Request. Interpret this if your server
requires authentication.
@@ -3468,7 +3632,7 @@ typedef struct {
The bend_search handler is a fairly close
- approximation of a protocol Z39.50 Search Request - and Response PDUs
+ approximation of a protocol Z39.50 Search Request - and Response PDUs.
The setname is the resultSetName from the protocol.
You are required to establish a mapping between the set name and whatever
your backend database likes to use.
@@ -3639,7 +3803,7 @@ typedef struct {
Delete
- For back-ends that supports delete of a result set only one handler
+ For back-ends that supports delete of a result set, only one handler
must be defined.
@@ -3706,12 +3870,12 @@ typedef struct bend_scan_rr {
This backend server handles both Z39.50 scan
and SRU scan. In order for a handler to distinguish between SRU (CQL) scan
- Z39.50 Scan , it must check for a non-NULL value of
+ Z39.50 Scan, it must check for a non-NULL value of
scanClause.
- if designed today, it would be a choice using a union or similar,
+ If designed today, it would be a choice using a union or similar,
but that would break binary compatibility with existing servers.
@@ -3791,14 +3955,14 @@ typedef struct bend_scan_rr {
- The above for the Apache 1.3 series.
+ The above is for the Apache 1.3 series.
Running a server with local access only
- Servers that is only being accessed from the local host should listen
- on UNIX file socket rather than a Internet socket. To listen on
+ A server that is only being accessed from the local host should listen
+ on UNIX file socket rather than an Internet socket. To listen on
/tmp/mysocket start the server as follows:
application unix:/tmp/mysocket
@@ -3828,7 +3992,7 @@ typedef struct bend_scan_rr {
The &asn; module is located in sub directory z39.50.
- There you'll find C files that implements encoders and decoders for the
+ There you'll find C files that implement encoders and decoders for the
Z39.50 types. You'll also find the protocol definitions:
z3950v3.asn, esupdate.asn,
and others.
@@ -3872,8 +4036,8 @@ typedef struct bend_scan_rr {
for details). When you use
odr_malloc(), you can release all of the
allocated data in a single operation, independent of any pointers and
- relations between the data. odr_malloc() is based on a
- "nibble-memory"
+ relations between the data. The odr_malloc() function
+ is based on a "nibble-memory"
scheme, in which large portions of memory are allocated, and then
gradually handed out with each call to odr_malloc().
The next time you call odr_reset(), all of the
@@ -3915,7 +4079,7 @@ typedef struct bend_scan_rr {
Z_<type> *zget_<type>(ODR o);
- eg.:
+ e.g.:
Z_InitRequest *zget_InitRequest(ODR o);
@@ -4004,7 +4168,7 @@ typedef struct Z_External
octet_aligned arm of the union.
- Some servers return ASN.1 structured data values (eg. database
+ Some servers return ASN.1 structured data values (e.g. database
records) as BER-encoded records placed in the
octet-aligned branch of the EXTERNAL CHOICE.
The ASN-module will not automatically decode
@@ -4015,8 +4179,8 @@ typedef struct Z_External
Z_ext_typeent *z_ext_gettypebyref(const oid *oid);
- Can be used to retrieve information about the known, external data
- types. The function return a pointer to a static area, or NULL, if no
+ can be used to retrieve information about the known, external data
+ types. The function returns a pointer to a static area, or NULL, if no
match for the given direct reference is found. The
Z_ext_typeent
is defined as:
@@ -4050,7 +4214,7 @@ typedef struct Z_ext_typeent
If you want to send EXTERNALs containing
- ASN.1-structured values in the occtet-aligned branch of the CHOICE, this
+ ASN.1-structured values in the octet-aligned branch of the CHOICE, this
is possible too. However, on the encoding phase, it requires a somewhat
involved juggling around of the various buffers involved.
@@ -4774,8 +4938,8 @@ typedef struct Z_ext_typeent
Introduction
&yaz; uses a very simple implementation of
- SOAP that only,
- currenly, supports what is sufficient to offer SRU SOAP functionality.
+ SOAP that only
+ (currently) supports what is sufficient to offer SRU SOAP functionality.
The implementation uses the
tree API of
libxml2 to encode and decode SOAP packages.
@@ -4854,7 +5018,7 @@ typedef struct {
The fault and soap_error
- arms represent both a SOAP fault - struct
+ arms both represent a SOAP fault - struct
Z_SOAP_Fault. Any other generic
(valid) package is represented by Z_SOAP_Generic.
@@ -4884,18 +5048,18 @@ int z_soap_codec(ODR o, Z_SOAP **pp,
When decoding, the z_soap_codec
inspects the XML content
and tries to match one of the services namespaces of the
- supplied handlers. If there is a match a handler function
+ supplied handlers. If there is a match. a handler function
is invoked which decodes that particular SOAP package.
If successful, the returned Z_SOAP package will be
of type Z_SOAP_Generic.
Member no is
- set the offset of handler that matched; ns
- is set to namespace of matching handler; the void pointer
+ set the offset of the handler that matched; ns
+ is set to namespace of the matching handler; the void pointer
p is set to the C data structure assocatiated
with the handler.
- When a NULL namespace is met (member ns bwlow),
+ When a NULL namespace is met (member ns below),
that specifies end-of-list.
@@ -4907,9 +5071,9 @@ typedef struct {
Z_SOAP_fun f;
} Z_SOAP_Handler;
- The ns is namespace of service associated with
- handler f. client_data
- is user-defined data which is passed to handler.
+ The ns is the namespace of the service associated with
+ handler f. The client_data
+ is user-defined data which is passed to the handler.
The prototype for a SOAP service handler is:
@@ -4922,10 +5086,10 @@ int handler(ODR o, void * ptr, void **handler_data,
is a libxml2 tree node pointer (xmlNodePtr)
and is a pointer to the Body element
of the SOAP package. The handler_data
- is an opaque pointer to a C definitions associated with the
- SOAP service. client_data is the pointer
+ is an opaque pointer to C definitions associated with the
+ SOAP service. The client_data is the pointer
which was set as part of the Z_SOAP_handler.
- Finally, ns the service namespace.
+ Finally, ns is the service namespace.
@@ -4986,9 +5150,9 @@ typedef struct {
Please observe that data of type xsd:string is represented
as a char pointer (char *). A null pointer
means that the element is absent.
- Data of type xsd:integer is representd as a pointer to
+ Data of type xsd:integer is represented as a pointer to
an int (int *). Again, a null pointer
- us used for absent elements.
+ is used for absent elements.
The SearchRetrieveResponse has the following definition.
@@ -5007,7 +5171,7 @@ typedef struct {
} Z_SRW_searchRetrieveResponse;
The num_records and num_diagnostics
- is number of returned records and diagnostics respectively and also
+ is number of returned records and diagnostics respectively, and also
correspond to the "size of" arrays records
and diagnostics.
@@ -5040,7 +5204,7 @@ typedef struct {
Supporting Tools
In support of the service API - primarily the ASN module, which
- provides the pro-grammatic interface to the Z39.50 APDUs, &yaz; contains
+ provides the programmatic interface to the Z39.50 APDUs, &yaz; contains
a collection of tools that support the development of applications.
@@ -5069,16 +5233,16 @@ typedef struct {
- The PQF have been adopted by other parties developing Z39.50
+ The PQF has been adopted by other parties developing Z39.50
software. It is often referred to as Prefix Query Notation
- PQN.
The PQF is defined by the pquery module in the YAZ library.
- There are two sets of function that have similar behavior. First
+ There are two sets of functions that have similar behavior. First
set operates on a PQF parser handle, second set doesn't. First set
- set of functions are more flexible than the second set. Second set
+ of functions are more flexible than the second set. Second set
is obsolete and is only provided to ensure backwards compatibility.
@@ -5102,7 +5266,7 @@ typedef struct {
A PQF parser is created and destructed by functions
yaz_pqf_create and
yaz_pqf_destroy respectively.
- Function yaz_pqf_parse parses query given
+ Function yaz_pqf_parse parses the query given
by string qbuf. If parsing was successful,
a Z39.50 RPN Query is returned which is created using ODR stream
o. If parsing failed, a NULL pointer is
@@ -5116,8 +5280,8 @@ typedef struct {
Error information for bad queries can be obtained by a call to
yaz_pqf_error which returns an error code and
modifies *msg to point to an error description,
- and modifies *off to the offset within last
- query were parsing failed.
+ and modifies *off to the offset within the last
+ query where parsing failed.
The second set of functions are declared as follows:
@@ -5206,9 +5370,9 @@ typedef struct {
a sub-query. The attribute type-value pair is packed in one string:
an attribute type, an equals sign, and an attribute value, like this:
@attr 1=1003.
- The type is always an integer but the value may be either an
+ The type is always an integer, but the value may be either an
integer or a string (if it doesn't start with a digit character).
- A string attribute-value is encoded as a Type-1 ``complex''
+ A string attribute-value is encoded as a Type-1 "complex"
attribute with the list of values containing the single string
specified, and including no semantic indicators.
@@ -5260,7 +5424,7 @@ typedef struct {
@prox exclusiondistanceorderedrelationwhich-codeunit-code
- in which the meanings of the parameters are as described in in
+ in which the meanings of the parameters are as described in
the standard, and they can take the following values:
@@ -5307,11 +5471,11 @@ typedef struct {
or
k
(the unit-code parameter is taken from the well-known list
- of alternatives described in below) or
+ of alternatives described below) or
private
or
p
- (the unit-code paramater has semantics specific to an
+ (the unit-code parameter has semantics specific to an
out-of-band agreement such as a profile).
@@ -5421,7 +5585,7 @@ typedef struct {
- which-code is ``known'', so the standard unit-codes are used
+ which-code is "known", so the standard unit-codes are used
@@ -5432,8 +5596,8 @@ typedef struct {
dylan and zimmerman must
both occur in the record, in that order, differing in position
by three or fewer words (i.e. with two or fewer words between
- them.) The query would find ``Bob Dylan, aka. Robert
- Zimmerman'', but not ``Bob Dylan, born as Robert Zimmerman''
+ them.) The query would find "Bob Dylan, aka. Robert
+ Zimmerman", but not "Bob Dylan, born as Robert Zimmerman"
since the distance in this case is four.
@@ -5461,8 +5625,8 @@ typedef struct {
access point
2038 indicates West Bounding Coordinate and
2030 indicates East Bounding Coordinate,
- so the query is for areas extending from -114 degrees
- to no more than -109 degrees.
+ so the query is for areas extending from -114 degrees longitude
+ to no more than -109 degrees longitude.
@@ -5481,7 +5645,7 @@ typedef struct {
CCL Syntax
The CCL parser obeys the following grammar for the FIND argument.
- The syntax is annotated by in the lines prefixed by
+ The syntax is annotated using lines prefixed by
--.
@@ -5547,9 +5711,9 @@ typedef struct {
singlechar#mask
- Assuming that the qualifiers ti,
- au
- and date are defined we may use:
+ Assuming that the qualifiers ti
+ and au
+ and date are defined, we may use:
ti=self portrait
@@ -5593,15 +5757,15 @@ typedef struct {
where qualifier-name is the name of the
- qualifier to be used (eg. ti),
+ qualifier to be used (e.g. ti),
type is attribute type in the attribute
set (Bib-1 is used if no attribute set is given) and
val is attribute value.
The type can be specified as an
- integer or as it be specified either as a single-letter:
+ integer, or as a single-letter:
u for use,
- r for relation,p for position,
- s for structure,t for truncation
+ r for relation, p for position,
+ s for structure,t for truncation,
or c for completeness.
The attributes for the special qualifier name term
are used when no CCL qualifier is given in a query.
@@ -5622,7 +5786,7 @@ typedef struct {
Use attribute (1). Common use attributes are
1 Personal-name, 4 Title, 7 ISBN, 8 ISSN, 30 Date,
- 62 Subject, 1003 Author), 1016 Any. Specify value
+ 62 Subject, 1003 Author, 1016 Any. Specify value
as an integer.
@@ -5655,7 +5819,7 @@ typedef struct {
t=value
Truncation attribute (5). Values: 1 right, 2 left,
- 3 left& right, 100 none, 101 process #, 102 regular-1,
+ 3 left and right, 100 none, 101 process #, 102 regular-1,
103 regular-2, 104 CCL.
@@ -5700,13 +5864,13 @@ typedef struct {
s=al
- Each token in the term is ANDed. (and-list).
+ Each token in the term is ANDed (and-list).
This does not set the structure at all.
s=ol
- Each token in the term is ORed. (or-list).
+ Each token in the term is ORed (or-list).
This does not set the structure at all.
@@ -5721,9 +5885,15 @@ typedef struct {
in YAZ 4.2.38.
+ s=sl
+
+ Tokens are split into sub-phrases of all combinations - in order.
+ This facility appeared in YAZ 5.14.0.
+
+ r=o
- Allows ranges and the operators greather-than, less-than, ...
+ Allows ranges and the operators greater-than, less-than, ...
equals.
This sets Bib-1 relation attribute accordingly (relation
ordered). A query construct is only treated as a range if
@@ -5749,7 +5919,7 @@ typedef struct {
r=omiteq
This will omit relation=equals (@attr 2=3) when r=o / r=r
- is used. This is useful for servers that somehow breaks
+ is used. This is useful for servers that somehow break
when an explicit relation=equals is used. Omitting the
relation is usually safe because "equals" is the default
behavior. This tweak was added in YAZ version 5.1.2.
@@ -5777,17 +5947,17 @@ typedef struct {
t=b
- Allows term to be both left&right truncated.
+ Allows term to be both left-and-right truncated.
If term is of the form ?x?, the
resulting term is x and trunctation is
- set to both left&right.
+ set to both left and right.
t=x
Allows masking anywhere in a term, thus fully supporting
# (mask one character) and ? (zero or more of any).
- If masking is used, trunction is set to 102 (regexp-1 in term)
+ If masking is used, truncation is set to 102 (regexp-1 in term)
and the term is converted accordingly to a regular expression.
@@ -5795,7 +5965,7 @@ typedef struct {
Allows masking anywhere in a term, thus fully supporting
# (mask one character) and ? (zero or more of any).
- If masking is used, trunction is set to 104 (Z39.58 in term)
+ If masking is used, truncation is set to 104 (Z39.58 in term)
and the term is converted accordingly to Z39.58 masking term -
actually the same truncation as CCL itself.
@@ -5822,7 +5992,7 @@ typedef struct {
ti
sets the use-attribute to 4. au sets the
use-attribute to 1.
- When no qualifiers are used in the query the structure-attribute is
+ When no qualifiers are used in the query, the structure-attribute is
set to free-form-text (105) (rule for term).
The date sets the relation attribute to
the relation used in the CCL query and sets the use attribute
@@ -5971,7 +6141,7 @@ struct ccl_rpn_node *ccl_find_str(CCL_bibset bibset, const char *str,
which takes the CCL profile (bibset) and query
(str) as input. Upon successful completion the RPN
- tree is returned. If an error occur, such as a syntax error, the integer
+ tree is returned. If an error occurs, such as a syntax error, the integer
pointed to by error holds the error code and
pos holds the offset inside query string in which
the parsing failed.
@@ -6091,7 +6261,7 @@ int cql_parser_stream(CQL_parser cp,
int cql_parser_stdio(CQL_parser cp, FILE *f);
The functions cql_parser_stream and
- cql_parser_stdio parses a CQL query
+ cql_parser_stdio parse a CQL query
- just like cql_parser_string.
The only difference is that the CQL query can be
fed to the parser in different ways.
@@ -6103,7 +6273,7 @@ int cql_parser_stdio(CQL_parser cp, FILE *f);
CQL tree
- The the query string is valid, the CQL parser
+ If the query string is valid, the CQL parser
generates a tree representing the structure of the
CQL query.
@@ -6111,7 +6281,7 @@ int cql_parser_stdio(CQL_parser cp, FILE *f);
struct cql_node *cql_parser_result(CQL_parser cp);
- cql_parser_result returns the
+ cql_parser_result returns
a pointer to the root node of the resulting tree.
@@ -6269,8 +6439,8 @@ int cql_transform_error(cql_transform_t ct, char **addinfop);
error-code and sets the string-pointer at
*addinfop to point to a string containing
additional information about the error that occurred: for
- example, if the error code is 15 (``Illegal or unsupported context
- set''), the additional information is the name of the requested
+ example, if the error code is 15 ("Illegal or unsupported context
+ set"), the additional information is the name of the requested
context set that was not recognised.
@@ -6346,7 +6516,7 @@ int cql_transform_FILE(cql_transform_t ct,
Typically, the RPN specifies an equivalent use attribute.
- For terms not bound by an index the pattern
+ For terms not bound by an index, the pattern
index.cql.serverChoice is used.
Here, the prefix cql is defined as
http://www.loc.gov/zing/cql/cql-indexes/v1.0/.
@@ -6378,7 +6548,7 @@ int cql_transform_FILE(cql_transform_t ct,
This pattern specifies how a CQL relation is mapped to RPN.
- pattern is name of relation
+ The pattern is name of relation
operator. Since = is used as
separator between CQL pattern and RPN, CQL relations
including = cannot be
@@ -6419,7 +6589,7 @@ int cql_transform_FILE(cql_transform_t ct,
This pattern specifies how a CQL structure is mapped to RPN.
- Note that this CQL pattern is somewhat to similar to
+ Note that this CQL pattern is somewhat similar to
CQL pattern relation.
The type is a CQL relation.
@@ -6578,7 +6748,7 @@ int cql_transform_FILE(cql_transform_t ct,
Conversion from CQL to XCQL is trivial and does not
require a mapping to be defined.
- There three functions to choose from depending on the
+ There are three functions to choose from depending on the
way you wish to store the resulting output (XML buffer
containing XCQL).
@@ -6589,12 +6759,12 @@ void cql_to_xml(struct cql_node *cn,
void cql_to_xml_stdio(struct cql_node *cn, FILE *f);
Function cql_to_xml_buf converts
- to XCQL and stores result in a user supplied buffer of a given
+ to XCQL and stores the result in a user-supplied buffer of a given
max size.
cql_to_xml writes the result in
- a user defined output stream.
+ a user-defined output stream.
cql_to_xml_stdio writes to a
a file.
@@ -6635,7 +6805,7 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
An OID can either be declared as a automatic variable or it can
- allocated using the memory utilities or ODR/NMEM. It's
+ be allocated using the memory utilities or ODR/NMEM. It's
guaranteed that an OID can fit in OID_SIZE integers.
Create OID on stack
@@ -6655,7 +6825,7 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
And OID may also be filled from a string-based representation using
- dots (.). This is achieved by function
+ dots (.). This is achieved by the function
int oid_dotstring_to_oid(const char *name, Odr_oid *oid);
@@ -6663,7 +6833,7 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
Using oid_oiddotstring_to_oid
- We can fill the Bib-1 attribute set OID easier with:
+ We can fill the Bib-1 attribute set OID more easily with:
Odr_oid bib1[OID_SIZE];
oid_oiddotstring_to_oid("1.2.840.10003.3.1", bib1);
@@ -6671,11 +6841,11 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
- We can also allocate an OID dynamically on a ODR stream with:
+ We can also allocate an OID dynamically on an ODR stream with:
Odr_oid *odr_getoidbystr(ODR o, const char *str);
- This creates an OID from string-based representation using dots.
+ This creates an OID from a string-based representation using dots.
This function take an &odr; stream as parameter. This stream is used to
allocate memory for the data elements, which is released on a
subsequent call to odr_reset() on that stream.
@@ -6683,7 +6853,7 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
Using odr_getoidbystr
- We can create a OID for the Bib-1 attribute set with:
+ We can create an OID for the Bib-1 attribute set with:
Odr_oid *bib1 = odr_getoidbystr(odr, "1.2.840.10003.3.1");
@@ -6701,8 +6871,8 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
OIDs can be copied with oid_oidcpy which takes
- two OID lists as arguments. Alternativly, an OID copy can be allocated
- on a ODR stream with:
+ two OID lists as arguments. Alternatively, an OID copy can be allocated
+ on an ODR stream with:
Odr_oid *odr_oiddup(ODR odr, const Odr_oid *o);
@@ -6736,10 +6906,10 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
A YAZ database handle is of type yaz_oid_db_t.
- Actually that's a pointer. You need not think deal with that.
+ Actually that's a pointer. You need not deal with that.
YAZ has a built-in database which can be considered "constant" for
most purposes.
- We can get hold that by using function yaz_oid_std.
+ We can get hold of that by using function yaz_oid_std.
All functions with prefix yaz_string_to_oid
@@ -6770,7 +6940,7 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
Standard OIDs
All the object identifers in the standard OID database as returned
- by yaz_oid_std can referenced directly in a
+ by yaz_oid_std can be referenced directly in a
program as a constant OID.
Each constant OID is prefixed with yaz_oid_ -
followed by OID class (lowercase) - then by OID name (normalized and
@@ -6803,7 +6973,7 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
Z39.50 PDUs and related structures, it is convenient to use the
memory-management system of the &odr; subsystem (see
). However, in some circumstances
- where you might otherwise benefit from using a simple nibble memory
+ where you might otherwise benefit from using a simple nibble-memory
management system, it may be impractical to use
odr_malloc() and odr_reset().
For this purpose, the memory manager which also supports the &odr;
@@ -6835,10 +7005,10 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
allocated on the handle.
- The nibble memory pool is shared amongst threads. POSIX
+ The nibble-memory pool is shared amongst threads. POSIX
mutex'es and WIN32 Critical sections are introduced to keep the
module thread safe. Function nmem_init()
- initializes the nibble memory library and it is called automatically
+ initializes the nibble-memory library and it is called automatically
the first time the YAZ.DLL is loaded. &yaz; uses
function DllMain to achieve this. You should
not call nmem_init or
@@ -6859,7 +7029,7 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
and implemented in src/log.c.
Due to name clash with syslog and some math utilities the logging
interface has been modified as of YAZ 2.0.29. The obsolete interface
- is still available if in header file yaz/log.h.
+ is still available in header file yaz/log.h.
The key points of the interface are:
@@ -6909,9 +7079,9 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
passed to yaz_log_init_level for it to take effect.
- Each module should check what log bits it should be used, by calling
+ Each module should check what log bits should be used, by calling
yaz_log_module_level with a suitable name for the
- module. The name is cleared from a preceding path and an extension, if any,
+ module. The name is cleared of a preceding path and an extension, if any,
so it is quite possible to use __FILE__ for it. If the
name has been passed to yaz_log_mask_str, the routine
returns a non-zero bitmask, which should then be used in consequent calls
@@ -6928,7 +7098,7 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
malloc, nmem, odr, eventl for internal
debugging of yaz itself.
Of course, any program using yaz is welcome to define as many new
- ones, as it needs.
+ ones as it needs.
By default the log is written to stderr, but this can be changed by a call
@@ -6987,7 +7157,7 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
YAZ provides a fast utility for working with MARC records.
Early versions of the MARC utility only allowed decoding of ISO2709.
- Today the utility may both encode - and decode to a varity of formats.
+ Today the utility may both encode - and decode to a variety of formats.
@@ -7039,7 +7209,7 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
by calling yaz_marc_destroy.
- All other function operate on a yaz_marc_t handle.
+ All other functions operate on a yaz_marc_t handle.
The output is specified by a call to yaz_marc_xml.
The xmlmode must be one of
@@ -7048,7 +7218,7 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
A simple line-by-line format suitable for display but not
- recommend for further (machine) processing.
+ recommended for further (machine) processing.
@@ -7099,7 +7269,7 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
YAZ_MARC_JSON
- MARC-in_JSON format.
+ MARC-in-JSON format.
@@ -7109,7 +7279,7 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
The actual conversion functions are
yaz_marc_decode_buf and
yaz_marc_decode_wrbuf which decodes and encodes
- a MARC record. The former function operates on simple buffers, the
+ a MARC record. The former function operates on simple buffers, and
stores the resulting record in a WRBUF handle (WRBUF is a simple string
type).
@@ -7143,9 +7313,9 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
Applications like
Pazpar2 uses XSLT to convert an XML encoded MARC record to an internal
- representation. This conversion mostly check the tag of a MARC field
+ representation. This conversion mostly checks the tag of a MARC field
to determine the basic rules in the conversion. This check is
- costly when that is tag is encoded as an attribute in MARCXML.
+ costly when that tag is encoded as an attribute in MARCXML.
By having the tag value as the element instead, makes processing
many times faster (at least for Libxslt).
@@ -7180,18 +7350,18 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
A control field is encoded as element c concatenated
with the tag value of the control field if the tag value
matches the regular expression [a-zA-Z0-9]*.
- If the tag value do not match the regular expression
+ If the tag value does not match the regular expression
[a-zA-Z0-9]* the control field is encoded
as element c and attribute code
will hold the tag value.
- This rule ensure that in the rare cases where a tag value might
- result in a non-wellformed XML YAZ encode it as a coded attribute
+ This rule ensures that in the rare cases where a tag value might
+ result in a non-well-formed XML, then YAZ will encode it as a coded attribute
(as in MARCXML).
- The control field content is the the text value of this element.
+ The control field content is the text value of this element.
Indicators are encoded as attribute names
- i1, i2, etc.. and
+ i1, i2, etc. and
corresponding values for each indicator.
@@ -7200,11 +7370,11 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
A data field is encoded as element d concatenated
with the tag value of the data field or using the attribute
code as described in the rules for control fields.
- The children of the data field element is subfield elements.
+ The children of the data field element are subfield elements.
Each subfield element is encoded as s
concatenated with the sub field code.
The text of the subfield element is the contents of the subfield.
- Indicators are encoded as attributes for the data field element similar
+ Indicators are encoded as attributes for the data field element, similar
to the encoding for control fields.
@@ -7255,8 +7425,8 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
The Retrieval facility is driven by an XML configuration. The
configuration is neither Z39.50 ZeeRex or SRU ZeeRex. But it
should be easy to generate both of them from the XML configuration.
- (unfortunately the two versions
- of ZeeRex differ substantially in this regard).
+ (Unfortunately the two versions
+ of ZeeRex differ substantially in this regard.)
Retrieval XML format
@@ -7288,7 +7458,7 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
Defines the name of the retrieval format. This can be
- any string. For SRU, the value, is equivalent to schema (short-hand);
+ any string. For SRU, the value is equivalent to schema (short-hand);
for Z39.50 it's equivalent to simple element set name.
For YAZ 3.0.24 and later this name may be specified as a glob
expression with operators
@@ -7300,7 +7470,7 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
Defines the URI schema name of the retrieval format. This can be
- any string. For SRU, the value, is equivalent to URI schema.
+ any string. For SRU, the value is equivalent to URI schema.
For Z39.50, there is no equivalent.
@@ -7316,13 +7486,13 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
The attributes, name and syntax
- may be specified for the backend element. These
+ may be specified for the backend element. The
semantics of these attributes is equivalent to those for the
retrieval. However, these values are passed to
the "backend".
- The backend element may includes one or more
+ The backend element may include one or more
conversion instructions (as children elements). The supported
conversions are:
@@ -7341,7 +7511,7 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
Format of input. Supported values are
marc (for ISO2709), xml
(MARCXML/MarcXchange) and json
- (MARC-in_JSON).
+ (MARC-in-JSON).
@@ -7355,7 +7525,7 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
marc (ISO2709),
marcxhcange (for MarcXchange),
or json
- (MARC-in_JSON ).
+ (MARC-in-JSON ).
@@ -7384,21 +7554,25 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
- xslt
+ select
- The xslt element specifies a conversion
- via &acro.xslt;. The following attributes may be specified:
+ The select selects one or more text nodes
+ and decodes them as XML.
+ The following attributes may be specified:
- stylesheet (REQUIRED)
+ path (REQUIRED)
- Stylesheet file.
+ X-Path expression for selecting text nodes.
+
+ This conversion is available in YAZ 5.8.0 and later.
+
@@ -7416,6 +7590,24 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
+
+ xslt
+
+
+ The xslt element specifies a conversion
+ via &acro.xslt;. The following attributes may be specified:
+
+ stylesheet (REQUIRED)
+
+
+ Stylesheet file.
+
+
+
+
+
+
+
@@ -7477,7 +7669,7 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
MARCXML backend
- SRW/SRU and Solr backends returns records in XML.
+ SRW/SRU and Solr backends return records in XML.
If they return MARCXML or MarcXchange, the retrieval module
can convert those into ISO2709 formats, most commonly USMARC
(AKA MARC21).
@@ -7552,17 +7744,17 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
In SRU/Solr, however, the model is different. Here, sorting is specified
- during the the search operation. Note, however, that SRU might
+ during the search operation. Note, however, that SRU might
perform sort as separate search, by referring to an existing result-set
in the query (result-set reference).
Using the Z39.50 sort service
- yaz-client and the ZOOM API supports the Z39.50 sort facility. In any
+ yaz-client and the ZOOM API support the Z39.50 sort facility. In any
case the sort sequence or sort critiera is using a string notation.
This notation is a one-line notation suitable for being manually
- entered or generated and allows for easy logging (one liner).
+ entered or generated, and allows for easy logging (one liner).
For the ZOOM API, the sort is specified in the call to ZOOM_query_sortby
function. For yaz-client the sort is performed and specified using
the sort and sort+ commands. For description of the sort criteria notation
@@ -7588,11 +7780,11 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
critieria is specified along with the search query.
- The sort is triggered by the presence of type 7 and the value of type 7
+ The sort is triggered by the presence of type 7, and the value of type 7
specifies the
sortRelation
-
+ .
The value for type 7 is 1 for ascending and 2 for descending.
For the
@@ -7601,7 +7793,7 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
only the generic part is handled. If generic sortKey is of type
sortField, then attribute type 1 is present and the value is
sortField (InternationalString). If generic sortKey is of type
- sortAttributes, then the attributes in list is used . generic sortKey
+ sortAttributes, then the attributes in the list are used. Generic sortKey
of type elementSpec is not supported.
@@ -7614,7 +7806,7 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
Facets
- YAZ supports facets for in Solr, SRU 2.0 and Z39.50 protocols.
+ YAZ supports facets in the Solr, SRU 2.0 and Z39.50 protocols.
Like Type-1/RPN, YAZ supports a string notation for specifying
@@ -7622,8 +7814,8 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
yaz_pqf_parse_facet_list.
- For ZOOM C the facets are given by option "facets"
- For yaz-client it is used for the facets command.
+ For ZOOM C the facets are given by option "facets".
+ For yaz-client it is used for the 'facets' command.
The grammar of this specification is as follows:
@@ -7636,7 +7828,7 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
The notation is inspired by PQF. The string following '@attr'
- may not include blanks and is of the form
+ must not include blanks and is of the form
type=value,
where type is an integer and
value is a string or an integer.
@@ -7659,7 +7851,7 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
1
- Field-name. This is often a string, eg "Author", "Year", etc.
+ Field-name. This is often a string, e.g. "Author", "Year", etc.
@@ -7691,7 +7883,7 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
Introduction
- &odr; is the BER-encoding/decoding subsystem of &yaz;. Care as been taken
+ &odr; is the BER-encoding/decoding subsystem of &yaz;. Care has been taken
to isolate &odr; from the rest of the package - specifically from the
transport interface. &odr; may be used in any context where basic
ASN.1/BER representations are used.
@@ -7802,7 +7994,7 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
releasing little bits of memory. Rather than managing the individual,
small bits of space, the system maintains a free-list of larger chunks
of memory, which are handed out in small bits. This scheme is
- generally known as a nibble memory system.
+ generally known as a nibble-memory system.
It is very useful for maintaining short-lived constructions such
as protocol PDUs.
@@ -8015,7 +8207,7 @@ void do_nothing_useful(Odr_int value)
odr_setprint(ODR o, FILE *file);
before encoders or decoders are being invoked.
- It is also possible to direct the output to a buffer (of indeed
+ It is also possible to direct the output to a buffer (or indeed
another file), by using the more generic mechanism:
void odr_set_stream(ODR o, void *handle,
@@ -8030,9 +8222,9 @@ void do_nothing_useful(Odr_int value)
The stream_close handler is optional and
if NULL for the function is provided, it will not be invoked.
The stream_write takes the ODR handle
- as parameter, the user defined handle, a type
+ as parameter, the user-defined handle, a type
ODR_OCTETSTRING, ODR_VISIBLESTRING
- which indicates the type of contents is being written.
+ which indicates the type of contents being written.
Another utility useful for diagnostics (error handling) or as
@@ -8042,7 +8234,7 @@ void do_nothing_useful(Odr_int value)
which returns a list of current elements that ODR deals with at the
moment. For the returned array, say ar,
- ar[0] is the top level element,
+ then ar[0] is the top level element,
ar[n] is the last. The last element has the
property that ar[n+1] == NULL.
@@ -8292,22 +8484,22 @@ int odr_octetstring(ODR o, Odr_oct **p, int optional,
The buf field should point to the character array
that holds the octetstring. The len field holds the
actual length.
- The character array need not be null terminated.
+ The character array need not be null-terminated.
To make things a little easier, an alternative is given for string
- types that are not expected to contain embedded NULL characters (eg.
+ types that are not expected to contain embedded NULL characters (e.g.
VisibleString):
int odr_cstring(ODR o, char **p, int optional, const char *name);
- Which encoded or decodes between OCTETSTRING representations and
- null-terminates C strings.
+ which encodes or decodes between OCTETSTRING representations and
+ null-terminated C strings.
- Functions are provided for the derived string types, eg:
+ Functions are provided for the derived string types, e.g.:
int odr_visiblestring(ODR o, char **p, int optional,
@@ -8322,7 +8514,7 @@ int odr_bitstring(ODR o, Odr_bitmask **p, int optional,
The opaque type Odr_bitmask is only suitable for
- holding relatively brief bit strings, eg. for options fields, etc.
+ holding relatively brief bit strings, e.g. for options fields, etc.
The constant ODR_BITMASK_SIZE multiplied by 8
gives the maximum possible number of bits.
@@ -8434,7 +8626,7 @@ int odr_sequence_end(ODR o);
parameter is ignored. On decoding, it returns 1 if the type is found in
the data stream. size bytes of memory are allocated,
and *p is set to point to this space.
- odr_sequence_end() is called at the end of the
+ The odr_sequence_end() is called at the end of the
complex function. Assume that a type is defined like this:
@@ -8560,7 +8752,7 @@ int odr_constructed_end(ODR o);
Assume that the IMPLICIT in the type definition above were replaced
- with EXPLICIT (or that the IMPLICIT keyword were simply deleted, which
+ with EXPLICIT (or that the IMPLICIT keyword was simply deleted, which
would be equivalent). The structure definition would look the same,
but the function would look like this:
@@ -8587,7 +8779,7 @@ int mySequence(ODR o, MySequence **p, int optional, const char *name)
Notice that the interface here gets kind of nasty. The reason is
simple: Explicitly tagged, constructed types are fairly rare in
the protocols that we care about, so the
- esthetic annoyance (not to mention the dangers of a cluttered
+ aesthetic annoyance (not to mention the dangers of a cluttered
interface) is less than the time that would be required to develop a
better interface. Nevertheless, it is far from satisfying, and it's a
point that will be worked on in the future. One option for you would
@@ -8784,7 +8976,7 @@ int myChoice(ODR o, MyChoice **p, int optional, const char *name)
declaring sequence elements (including CHOICEs) optional.
- The ASN.1 specifications naturally requires that each member of a
+ The ASN.1 specifications naturally require that each member of a
CHOICE have a distinct tag, so they can be told apart on decoding.
Sometimes it can be useful to define a CHOICE that has multiple types
that share the same tag. You'll need some other mechanism, perhaps
@@ -8801,7 +8993,7 @@ void odr_choice_bias(ODR o, int what);
provides this functionality. When called, it leaves a notice for the next
call to odr_choice() to be called on the decoding
- stream o that only the arm entry with
+ stream o, that only the arm entry with
a which field equal to what
should be tried.
@@ -8971,8 +9163,8 @@ void odr_choice_bias(ODR o, int what);
The cs_create function returns a null-pointer
if a system error occurs.
- The blocking parameter should be one if
- you wish the association to operate in blocking mode, zero otherwise.
+ The blocking parameter should be '1' if
+ you wish the association to operate in blocking mode, and '0' otherwise.
The protocol field should be
PROTO_Z3950 or PROTO_HTTP.
Protocol PROTO_SR is no longer supported.
@@ -9009,7 +9201,7 @@ void odr_choice_bias(ODR o, int what);
should call it repeatedly with the same values of buf
and len, until the buffer has been transmitted.
When a full buffer has been sent, the function will return 0 for
- success. -1 indicates an error condition (see below).
+ success. The return value -1 indicates an error condition (see below).
int cs_get(COMSTACK handle, char **buf, int *size);
@@ -9025,12 +9217,12 @@ void odr_choice_bias(ODR o, int what);
around internally by the subsystem when partial packages are read. Before
calling
cs_get
- for the fist time, the buffer can be initialized to the null pointer,
- and the length should also be set to 0 - cs_get will perform a
+ for the first time, the buffer can be initialized to the null pointer,
+ and the length should also be set to 0 (cs_get will perform a
malloc(2)
- on the buffer for you. When a full buffer has been read, the size of
- the package is returned (which will always be greater than 1). -1
- indicates an error condition.
+ on the buffer for you). When a full buffer has been read, the size of
+ the package is returned (which will always be greater than 1).
+ The return value -1 indicates an error condition.
See also the cs_more() function below.
@@ -9133,7 +9325,7 @@ void odr_choice_bias(ODR o, int what);
int cs_fileno(COMSTACK h);
- Returns the file descriptor of the association. Use this when
+ returns the file descriptor of the association. Use this when
file-level operations on the endpoint are required
(select(2) operations, specifically).
@@ -9219,7 +9411,7 @@ void odr_choice_bias(ODR o, int what);
You may need to use this function with some care if your
- name server service is slow or unreliable
+ name server service is slow or unreliable.
@@ -9279,8 +9471,8 @@ void odr_choice_bias(ODR o, int what);
cs_straddr. The str
is similar to that described for cs_straddr
but with a prefix denoting the &comstack; type. Prefixes supported
- are tcp:, unix: and
- ssl: for TCP/IP, UNIX and SSL respectively.
+ are tcp: and unix: and
+ ssl: for TCP/IP and UNIX and SSL respectively.
If no prefix is given, then TCP/IP is used.
The blocking is passed to
function cs_create. The third parameter
@@ -9297,7 +9489,7 @@ void odr_choice_bias(ODR o, int what);
void *cs_get_ssl(COMSTACK cs);
Returns the SSL handle, SSL * for comstack. If comstack
- is not of type SSL, NULL is returned.
+ is not of type SSL, then NULL is returned.
@@ -9347,15 +9539,15 @@ void odr_choice_bias(ODR o, int what);
You can the textual representation of the error code
- by using cs_errmsg - which
- works like strerror(3)
+ by using cs_errmsg, which
+ works like strerror(3).
const char *cs_errmsg(int n);
- It is also possible to get straight to the textual represenataion
- without the error code by using
+ It is also possible to get straight to the textual representation
+ without the error code, by using
cs_strerror.