From d802116821b20c1dac70011b1ff36edfc4a3119b Mon Sep 17 00:00:00 2001 From: David Crossley Date: Thu, 3 Sep 2015 15:53:19 +1000 Subject: [PATCH] Various minor text tweaks. --- doc/book.xml | 95 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 48 insertions(+), 47 deletions(-) diff --git a/doc/book.xml b/doc/book.xml index 6b4c3f3..eaa87ca 100644 --- a/doc/book.xml +++ b/doc/book.xml @@ -1297,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 @@ -1316,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 @@ -1361,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 @@ -1449,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 @@ -1488,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 @@ -1505,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 @@ -1515,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. @@ -1532,7 +1533,7 @@ 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). @@ -1544,7 +1545,7 @@ 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 . @@ -1604,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 @@ -1640,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). @@ -1676,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. @@ -1742,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 @@ -1798,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. @@ -1820,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. @@ -1961,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. @@ -2004,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 @@ -2030,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. @@ -2058,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 @@ -2119,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. @@ -2185,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 *. @@ -2206,7 +2207,7 @@ render The 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. @@ -2285,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 @@ -2356,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. @@ -2421,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 @@ -2541,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. @@ -2623,12 +2624,12 @@ package-name Extended Service Request package name. Must be specified - as part of a request + as part of a request. none user-id - User ID of Extended Service Package. Is a request option + User ID of Extended Service Package. Is a request option. none @@ -2868,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 @@ -2995,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. @@ -3007,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. @@ -3047,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 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. @@ -3060,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. @@ -3078,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. @@ -3126,7 +3127,7 @@ ZOOM_EVENT_RECV_DATA - Data has been received) + Data has been received ZOOM_EVENT_TIMEOUT @@ -3150,7 +3151,7 @@ ZOOM_EVENT_RECV_SEARCH - A search result been received + A search result has been received -- 1.7.10.4