X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=doc%2Ftools.xml;h=b0625684ed927ec53fe621c5a4cfdbb418e11585;hp=f10bdc024b4cacde78fe9477d64d4c412d452576;hb=4f8ea8cfaf2f3d95e4efcf9494526c2b4be43eb8;hpb=e232998663cbfa8e9c489d99245e530c03223571 diff --git a/doc/tools.xml b/doc/tools.xml index f10bdc0..b062568 100644 --- a/doc/tools.xml +++ b/doc/tools.xml @@ -1,4 +1,4 @@ - + Supporting Tools @@ -225,7 +225,7 @@ @and. Its semantics are described in section 3.7.2 (Proximity) of Z39.50 the standard itself, which can be read on-line at - + In PQF, the proximity operation is represented by a sequence @@ -294,50 +294,63 @@ (The numeric values of the relation and well-known unit-code parameters are taken straight from - the ASN.1 of the proximity structure in the standard.) PQF queries - PQF queries using simple terms + + PQF queries using simple terms dylan + "bob dylan" - PQF boolean operators + + PQF boolean operators @or "dylan" "zimmerman" + @and @or dylan zimmerman when + @and when @or dylan zimmerman - PQF references to result sets + + PQF references to result sets @set Result-1 - @and @set seta setb + + @and @set seta @set setb - Attributes for terms + + Attributes for terms @attr 1=4 computer + @attr 1=4 @attr 4=1 "self portrait" + @attrset exp1 @attr 1=1 CategoryList + @attr gils 1=2008 Copenhagen + @attr 1=/book/title computer - PQF Proximity queries + + PQF Proximity queries @prox 0 3 1 2 k 2 dylan zimmerman @@ -376,14 +389,16 @@ - PQF specification of search term + + PQF specification of search term type @term string "a UTF-8 string, maybe?" - PQF mixed queries + + PQF mixed queries @or @and bob dylan @set Result-1 @@ -431,7 +446,8 @@ license, it is included as a supplement to &yaz;. - CCL Syntax + + CCL Syntax The CCL parser obeys the following grammar for the FIND argument. @@ -480,7 +496,8 @@ - CCL queries + + CCL queries The following queries are all valid: @@ -514,7 +531,8 @@ - CCL Qualifiers + + CCL Qualifiers Qualifiers are used to direct the search to a particular searchable @@ -536,7 +554,8 @@ lines in a CCL profile: qualifier specification, qualifier alias, comments and directives. - Qualifier specification + + Qualifier specification A qualifier specification is of the form: @@ -561,7 +580,8 @@ or c for completeness. The attributes for the special qualifier name term are used when no CCL qualifier is given in a query. - Common Bib-1 attributes +
+ Common Bib-1 attributes @@ -632,17 +652,16 @@
- The complete list of Bib-1 attributes can be found - - here - . + Refer to the complete + list of Bib-1 attributes It is also possible to specify non-numeric attribute values, which are used in combination with certain types. The special combinations are: - Special attribute combos +
+ Special attribute combos @@ -728,7 +747,7 @@
- CCL profile + CCL profile Consider the following definition: @@ -773,7 +792,8 @@
- Qualifier alias + + Qualifier alias A qualifier alias is of the form: @@ -790,20 +810,23 @@ - Comments + + Comments Lines with white space or lines that begin with character # are treated as comments. - Directives + + Directives Directive specifications takes the form @directive value - CCL directives +
+ CCL directives @@ -867,7 +890,8 @@
- CCL API + + CCL API All public definitions can be found in the header file ccl.h. A profile identifier is of type @@ -930,22 +954,20 @@ struct ccl_rpn_node *ccl_find_str (CCL_bibset bibset, const char *str, - CQL + CQL - CQL + CQL - Common Query Language - was defined for the - SRW - protocol. + SRU protocol. In many ways CQL has a similar syntax to CCL. The objective of CQL is different. Where CCL aims to be an end-user language, CQL is the protocol - query language for SRW. + query language for SRU. If you are new to CQL, read the - Gentle - Introduction. + Gentle Introduction. @@ -965,17 +987,16 @@ struct ccl_rpn_node *ccl_find_str (CCL_bibset bibset, const char *str, The parser converts a valid CQL query to PQF, thus providing a - way to use CQL for both SRW/SRU servers and Z39.50 targets at the + way to use CQL for both SRU servers and Z39.50 targets at the same time. The parser converts CQL to - - XCQL. + XCQL. XCQL is an XML representation of CQL. - XCQL is part of the SRW specification. However, since SRU + XCQL is part of the SRU specification. However, since SRU supports CQL only, we don't expect XCQL to be widely used. Furthermore, CQL has the advantage over XCQL that it is easy to read. @@ -983,7 +1004,7 @@ struct ccl_rpn_node *ccl_find_str (CCL_bibset bibset, const char *str, - CQL parsing + CQL parsing A CQL parser is represented by the CQL_parser handle. Its contents should be considered &yaz; internal (private). @@ -1029,7 +1050,7 @@ int cql_parser_stdio(CQL_parser cp, FILE *f); - CQL tree + CQL tree The the query string is valid, the CQL parser generates a tree representing the structure of the @@ -1081,6 +1102,8 @@ struct cql_node { If an index is unspecified for a search term, index will be NULL. + + index_uri: index URi for search term or NULL if none could be resolved for the index. @@ -1131,12 +1154,12 @@ struct cql_node { - CQL to PQF conversion + CQL to PQF conversion Conversion to PQF (and Z39.50 RPN) is tricky by the fact that the resulting RPN depends on the Z39.50 target capabilities (combinations of supported attributes). - In addition, the CQL and SRW operates on index prefixes + In addition, the CQL and SRU operates on index prefixes (URI or strings), whereas the RPN uses Object Identifiers for attribute sets. @@ -1171,10 +1194,10 @@ int cql_transform_buf(cql_transform_t ct, If conversion failed, cql_transform_buf - returns a non-zero SRW error code; otherwise zero is returned + returns a non-zero SRU error code; otherwise zero is returned (conversion successful). The meanings of the numeric error - codes are listed in the SRW specifications at - + codes are listed in the SRU specifications at + If conversion fails, more information can be obtained by calling @@ -1190,7 +1213,7 @@ int cql_transform_error(cql_transform_t ct, char **addinfop); context set that was not recognised. - The SRW error-codes may be translated into brief human-readable + The SRU error-codes may be translated into brief human-readable error messages using const char *cql_strerror(int code); @@ -1213,7 +1236,7 @@ int cql_transform_FILE(cql_transform_t ct, open FILE. - + Specification of CQL to RPN mappings The file supplied to functions @@ -1364,7 +1387,7 @@ int cql_transform_FILE(cql_transform_t ct, - CQL to RPN mapping file + CQL to RPN mapping file This simple file defines two context sets, three indexes and three relations, a position pattern and a default structure. @@ -1418,8 +1441,18 @@ int cql_transform_FILE(cql_transform_t ct, + + CQL to RPN using Bath Profile + + The file etc/pqf.properties has mappings from + the Bath Profile and Dublin Core to RPN. + If YAZ is installed as a package it's usually located + in /usr/share/yaz/etc and part of the + development package, such as libyaz-dev. + + - CQL to XCQL conversion + CQL to XCQL conversion Conversion from CQL to XCQL is trivial and does not require a mapping to be defined. @@ -1598,7 +1631,7 @@ typedef struct oident again, corresponding to the specific OIDs defined by the standard. Refer to the - + Registry of Z39.50 Object Identifiers for the whole list. @@ -1945,7 +1978,7 @@ typedef struct oident - MARC + MARC YAZ provides a fast utility that decodes MARC records and @@ -2007,7 +2040,7 @@ typedef struct oident - YAZ_MARC_MARXML + YAZ_MARC_MARCXML The resulting record is converted to MARCXML. @@ -2033,7 +2066,7 @@ typedef struct oident stores the resulting record in a WRBUF handle (WRBUF is a simple string type). - + Display of MARC record The followint program snippet illustrates how the MARC API may