X-Git-Url: http://git.indexdata.com/?p=yazproxy-moved-to-github.git;a=blobdiff_plain;f=doc%2Freference.xml;h=c2ca0dfb052f9f5b9e9ce7d3bef14ce723faeb27;hp=15274ea7b372d7d630412f5e7cd589b1da887b43;hb=e751544e4f8f678eafaf851a215033af6a779684;hpb=101d9c2ca072f3cd7fb6cb89c67573318b14b8c1 diff --git a/doc/reference.xml b/doc/reference.xml index 15274ea..c2ca0df 100644 --- a/doc/reference.xml +++ b/doc/reference.xml @@ -12,12 +12,12 @@ see . - As an option the proxy may change user identity to a less priviledged + As an option, the proxy may change user identity to a less privileged user.
- Specifying the Backend Server + Choosing the Backend Server When the proxy receives a Z39.50 Initialize Request from a Z39.50 client, it determines the backend server by the following rules: @@ -57,6 +57,30 @@ + + If the proxy receives an SRW/SRU request, the following rules are used. + + + If default target has Explain information with a + database that matches the path of the + HTTP request of SRW/SRU that backend server is used for + SRW/SRU operation. + + + + + Otherwise the service will return HTTP 404 (Not found). + + + + + + + We know it is stupid to only check for explain in default target. + It means that it is only possible to offer one SRW/SRU server. + We expect to improve that in the next version of the YAZ proxy. + +
Keep-alive Facility @@ -92,6 +116,81 @@
+ +
+ Query Caching + + Simple stateless clients often send identical Z39.50 searches + in a relatively short period of time (e.g. in order to produce a + results-list page, the next page, + a single full-record, etc). And for many targets, it's + much more expensive to produce a new result set than to + reuse an existing one. + + + The proxy tries to solve that by remembering the last query for each + backend target, so that if an identical query is received next, it + is turned into Present Requests rather than new Search Requests. + + + + In a future we release will will probably allows for + an arbitrary-sized cache for targets supporting named result sets. + + + + You can enable/disable query caching using option -o. + +
+ +
+ Record Caching + + As an option, the proxy may also cache result set records for the + last search. + The proxy takes into account the Record Syntax and CompSpec. + The CompSpec includes simple element set names as well. + By default the cache is 200000 bytes per session. + +
+ +
+ Query Validation + + The Proxy may also be configured to trap particular attributes in + Type-1 queries and send Bib-1 diagnostics back to the client without + even consulting the backend target. This facility may be useful if + a target does not properly issue diagnostics when unsupported attributes + are send to it. + +
+ +
+ Record Syntax Validation + + The proxy may be configured to accept, reject or convert records. + When accepted, the target passes search/present requests to the + backend target under the assumption that the target can honor the + request (In fact it may not do that). When a record is rejected because + the record syntax is "unsupported" the proxy returns a diagnostic to the + client. Finally, the proxy may convert records. + + + The proxy can convert from MARC to MARCXML and thereby offer an + XML version of any MARC record as long as it is ISO2709 encoded. + If the proxy is compiled with libXSLT support it can also + perform XSLT on XML. + +
+ +
+ Other Optimizations + + We've had some plans to support global caching of result set records, + but this has not yet been implemented. + +
+
Proxy Configuration File @@ -104,6 +203,10 @@ libXSLT support in order for the config file facility to be enabled. + + See for an XML schema + for the configuration. + To check for a config file to be well-formed, the yazproxy may be invoked without specifying a listening port, i.e. @@ -117,14 +220,16 @@ Proxy Configuration Header The proxy config file must have a root element called - proxy. All information except an optional XML - header must be stored within the proxy element. + proxy and scoped within namespace + xmlns="http://indexdata.dk/yazproxy/schema/0.8/. + All information except an optional XML header must be stored + within the proxy element. <?xml version="1.0"?> - <proxy> - <!-- content here .. --> - </proxy> + <proxy xmlns="http://indexdata.dk/yazproxy/schema/0.8/"> + <!-- content here .. --> + </proxy>
@@ -142,7 +247,7 @@ <?xml version="1.0"?> - <proxy> + <proxy xmlns="http://indexdata.dk/yazproxy/schema/0.8/"> <target name="server1" default="1"> <!-- description of server1 .. --> </target> @@ -177,7 +282,7 @@ This can also be specified on the command line by using option - -T. Refer to OPTIONS. + -T. Refer to OPTIONS in .
@@ -190,7 +295,7 @@ This can also be specified on the command line by using option - -i. Refer to OPTIONS. + -i. Refer to OPTIONS in . @@ -213,7 +318,7 @@ The following sets maximum number of bytes transferred in a - target session to 1 MB and maxinum of requests to 400. + target session to 1 MB and maximum of requests to 400. <keepalive> <bandwidth>1048576</bandwidth> @@ -306,19 +411,6 @@ - - -
syntax @@ -344,18 +436,55 @@ type should be XML. The proxy will use preferred record syntax USMARC/MARC21 against the backend target. - To accept USMARC and offer MARCXML XML records but reject - all other requests the following configuration could be used: - - <proxy> + + If attribute stylesheet is given, the proxy + will convert XML record from server via XSLT. It is important + that the content from server is XML. If used in conjunction with + attribute marcxml the MARC to MARCXML conversion + takes place before the XSLT conversion takes place. + + + If attribute identifier is given that is the + SRW/SRU record schema identifier for the resulting output record (after + MARCXML and/or XSLT conversion). + + + If sub element title is given (as child element + of syntax, then that is the official SRW/SRU + name of the resulting record schema. + + + If sub element name is given that is an alias + for the record schema identifier. Multiple names + may be specified. + + + MARCXML conversion + To accept USMARC and offer MARCXML XML plus Dublin Core (via + XSLT conversion) but the following configuration could be used: + + <proxy> <target name="mytarget"> + .. <syntax type="usmarc"/> - <syntax type="xml" marcxml="1"/> - <syntax type="*" error="238"/> + <syntax type="xml" marcxml="1" + identifier="info:srw/schema/1/marcxml-v1.1" + <title>MARCXML<title> + <name>marcxml<name> + <syntax> + <syntax type="xml" marcxml="1" stylesheet="MARC21slim2SRWDC.xsl" + identifier="info:srw/schema/1/dc-v1.1"> + <title>Dublin Core<title> + <name>dc<name> + <syntax> + <syntax type="*" error="238"/> + .. </target> - </proxy> - + </proxy> + + +
@@ -513,81 +642,6 @@
- -
- Query Caching - - Simple stateless clients often send identical Z39.50 searches - in a relatively short period of time (e.g. in order to produce a - results-list page, the next page, - a single full-record, etc). And for many targets, it's - much more expensive to produce a new result set than to - reuse an existing one. - - - The proxy tries to solve that by remembering the last query for each - backend target, so that if an identical query is received next, it - is turned into Present Requests rather than new Search Requests. - - - - In a future we release will will probably allows for - an arbitrary-sized cache for targets supporting named result sets. - - - - You can enable/disable query caching using option -o. - -
- -
- Record Caching - - As an option, the proxy may also cache result set records for the - last search. - The proxy takes into account the Record Syntax and CompSpec. - The CompSpec includes simple element set names as well. - By default the cache is 200000 bytes per session. - -
- -
- Query Validation - - The Proxy may also be configured to trap particular attributes in - Type-1 queries and send Bib-1 diagnostics back to the client without - even consulting the backend target. This facility may be useful if - a target does not properly issue diagnostics when unsupported attributes - are send to it. - -
- -
- Record Syntax Validation - - The proxy may be configured to accept, reject or convert records. - When accepted, the target passes search/present requests to the - backend target under the assumption that the target can honor the - request (In fact it may not do that). When a record is rejected because - the record syntax is "unsupported" the proxy returns a diagnostic to the - client. Finally, the proxy may convert records. - - - The proxy can convert from MARC to MARCXML and thereby offer an - XML version of any MARC record as long as it is ISO2709 encoded. - If the proxy is compiled with libXSLT support it can also - perform XSLT on XML. - -
- -
- Other Optimizations - - We've had some plans to support global caching of result set records, - but this has not yet been implemented. - -
-
Proxy Usage (man page) @@ -623,7 +677,114 @@ characterInfo of the information choice. -
+ +
+ YAZ Proxy Configuration Schema + + Here an XML Schema for the YAZ proxy configuration file. + The schema, yazproxy.xsd is located in sub + directory etc of the distribution. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + +