X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=doc%2Ftools.xml;h=80a9756c16751288f92b5df99260cda5f21b83d4;hb=7ed3ff16e4d2bcaf16883cbf0bc8cbc223682b00;hp=1f3cf5f319304a135721da61540416af9aa06a34;hpb=d940392c53c32ccf76fb287cc5b997b9e921a431;p=yaz-moved-to-github.git
diff --git a/doc/tools.xml b/doc/tools.xml
index 1f3cf5f..80a9756 100644
--- a/doc/tools.xml
+++ b/doc/tools.xml
@@ -640,7 +640,7 @@
- Refer to the complete
+ Refer to or the complete
list of Bib-1 attributes
@@ -731,6 +731,24 @@
set to both left&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)
+ and the term is converted accordingly to a regular expression.
+
+
+
+ t=z
+ 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)
+ and the term is converted accordingly to Z39.58 masking term -
+ actually the same truncation as CCL itself.
+
+
+
@@ -1725,9 +1743,9 @@ void cql_to_xml_stdio(struct cql_node *cn, FILE *f);
NMEM nmem_create(void);
void nmem_destroy(NMEM n);
- void *nmem_malloc(NMEM n, int size);
+ void *nmem_malloc(NMEM n, size_t size);
void nmem_reset(NMEM n);
- int nmem_total(NMEM n);
+ size_t nmem_total(NMEM n);
void nmem_init(void);
void nmem_exit(void);
@@ -1912,9 +1930,9 @@ void cql_to_xml_stdio(struct cql_node *cn, FILE *f);
MARC
- YAZ provides a fast utility that decodes MARC records and
- encodes to a varity of output formats. The MARC records must
- be encoded in ISO2709.
+ 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.
@@ -1932,6 +1950,8 @@ void cql_to_xml_stdio(struct cql_node *cn, FILE *f);
#define YAZ_MARC_MARCXML 3
#define YAZ_MARC_ISO2709 4
#define YAZ_MARC_XCHANGE 5
+ #define YAZ_MARC_CHECK 6
+ #define YAZ_MARC_TURBOMARC 7
/* supply iconv handle for character set conversion .. */
void yaz_marc_iconv(yaz_marc_t mt, yaz_iconv_t cd);
@@ -1941,15 +1961,22 @@ void cql_to_xml_stdio(struct cql_node *cn, FILE *f);
/* decode MARC in buf of size bsize. Returns >0 on success; <=0 on failure.
On success, result in *result with size *rsize. */
- int yaz_marc_decode_buf (yaz_marc_t mt, const char *buf, int bsize,
- char **result, int *rsize);
+ int yaz_marc_decode_buf(yaz_marc_t mt, const char *buf, int bsize,
+ const char **result, size_t *rsize);
/* decode MARC in buf of size bsize. Returns >0 on success; <=0 on failure.
On success, result in WRBUF */
- int yaz_marc_decode_wrbuf (yaz_marc_t mt, const char *buf,
- int bsize, WRBUF wrbuf);
+ int yaz_marc_decode_wrbuf(yaz_marc_t mt, const char *buf,
+ int bsize, WRBUF wrbuf);
]]>
+
+
+ The synopsis is just a basic subset of all functionality. Refer
+ to the actual header file marcdisp.h for
+ details.
+
+
A MARC conversion handle must be created by using
yaz_marc_create and destroyed
@@ -1974,7 +2001,7 @@ void cql_to_xml_stdio(struct cql_node *cn, FILE *f);
YAZ_MARC_MARCXML
- The resulting record is converted to MARCXML.
+ MARCXML.
@@ -1983,10 +2010,41 @@ void cql_to_xml_stdio(struct cql_node *cn, FILE *f);
YAZ_MARC_ISO2709
- The resulting record is converted to ISO2709 (MARC).
+ ISO2709 (sometimes just referred to as "MARC").
+
+
+
+
+
+ YAZ_MARC_XCHANGE
+
+
+ MarcXchange.
+
+
+
+
+
+ YAZ_MARC_CHECK
+
+
+ Pseudo format for validation only. Does not generate
+ any real output except diagnostics.
+
+
+ YAZ_MARC_TURBOMARC
+
+
+ XML format with same semantics as MARCXML but more compact
+ and geared towards fast processing with XSLT. Refer to
+ for more information.
+
+
+
+
@@ -2000,13 +2058,13 @@ void cql_to_xml_stdio(struct cql_node *cn, FILE *f);
Display of MARC record
- The followint program snippet illustrates how the MARC API may
+ The following program snippet illustrates how the MARC API may
be used to convert a MARC record to the line-by-line format:
+
+ TurboMARC
+
+ TurboMARC is yet another XML encoding of a MARC record. The format
+ was designed for fast processing with XSLT.
+
+
+ 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
+ to determine the basic rules in the conversion. This check is
+ costly when that is 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).
+
+
+ TurboMARC is encoded as follows:
+
+
+ Record elements is part of namespace
+ "http://www.indexdata.com/turbomarc".
+
+
+ A record is enclosed in element r.
+
+
+ A collection of records is enclosed in element
+ collection.
+
+
+ The leader is encoded as element l with the
+ leader content as its (text) value.
+
+
+ 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
+ [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
+ (as in MARCXML).
+
+
+ The control field content is the the text value of this element.
+ Indicators are encoded as attribute names
+ i1, i2, etc.. and
+ corresponding values for each indicator.
+
+
+ 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.
+ 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
+ to the encoding for control fields.
+
+
+
+