Remove floating cdata (should be in comment)
[metaproxy-moved-to-github.git] / etc / config-loc.xml
1 <?xml version="1.0"?>
2 <!--
3 1.   LCDB_UTF8_Port1        (e.g., z3950.loc.gov:7097/voyager)
4 2.   LCDB_UTF8_Port2        (e.g., z3950.loc.gov:7098/voyager)
5 3.   LCDB_MARC8_Port1       (e.g., z3950.loc.gov:7095/voyager)
6 4.   LCDB_MARC8_Port2       (e.g., z3950.loc.gov:7096/voyager)
7 5.   HLAS_UTF8              (e.g., z3950.loc.gov:7999/voyager)
8 6.   HLAS_MARC8             (e.g., z3950.loc.gov:7990/voyager)
9 7.   NLSBPH_UTF8            (e.g., z3950.loc.gov:7499/voyager)
10 8.   NLSBPH_MARC8           (e.g., z3950.loc.gov:7490/voyager)
11 9.   Name_Authority_File    (e.g., sun4.loc.gov:9018/NAF)
12 10.  Subject_Authority_File (e.g., sun4.loc.gov:9019/SAF)
13 11.  Server_in_the_UK       (e.g., blah.blah.uk:210/Aleph)
14 12.  Server_in_California   (e.g., blah.blah.edu:210/Unicorn)
15 13.  Performing_Arts_Encyclopedia (e.g., sun4.loc.gov:9013/PAE)
16 14.  Veterans_History_Project (e.g., sun4.loc.gov:9013/VETS)
17
18
19 MetaProxy could be configured to support accessing
20 the following databaseNames (virtual databases):
21
22    LCDB_UTF8               (1 and 2 above with load balancing)
23    LCDB_MARC8              (3 and 4 above with load balancing)
24    AllVoyager              (1, 2, 5, 7 above with merged results)
25    Name_Authority_File     (Just 9 above)
26    Subject_Authority_File  (Just 10 above)
27    Authority_Files         (9 and 10 above)
28    LC_and_Friends          (1, 2, 5, 7, 11, 12, 13, and 14 above)
29 -->
30 <metaproxy xmlns="http://indexdata.com/metaproxy" version="1.0">
31   <start route="start"/>
32   <filters>
33     <!-- record transform for servers that return MARC8-encoded MARC -->
34     <filter id="marc8-records" type="record_transform">
35       <retrievalinfo  xmlns="http://indexdata.com/yaz" version="1.0">
36         <retrieval syntax="xml" name="dc"
37                    identifier="info:srw/schema/1/dc-v1.1">
38         <backend syntax="usmarc" name="F">
39           <marc inputformat="marc" outputformat="marcxml"
40                 inputcharset="marc-8"/>
41           <xslt stylesheet="../xml/xslt/MARC21slim2DC.xsl"/>
42         </backend>
43       </retrieval>
44       <retrieval syntax="opac"/>
45       <retrieval syntax="xml" name="opac">
46         <backend syntax="opac" name="F">
47         <marc inputformat="marc" outputformat="marcxml"
48               inputcharset="marc-8"/>
49         </backend>
50       </retrieval>
51       <retrieval syntax="usmarc">
52         <backend syntax="usmarc" name="F">
53         </backend>
54         </retrieval>
55       </retrievalinfo>
56     </filter>
57
58     <!-- record transform for servers that return UTF8-encoded MARC -->
59     <filter id="utf8-records" type="record_transform">
60       <retrievalinfo  xmlns="http://indexdata.com/yaz" version="1.0">
61         <retrieval syntax="xml" name="dc"
62                    identifier="info:srw/schema/1/dc-v1.1">
63         <backend syntax="usmarc" name="F">
64           <marc inputformat="marc" outputformat="marcxml"
65                 inputcharset="utf8"/>
66           <xslt stylesheet="../xml/xslt/MARC21slim2DC.xsl"/>
67         </backend>
68       </retrieval>
69       <retrieval syntax="opac"/>
70       <retrieval syntax="xml" name="opac">
71         <backend syntax="opac" name="F">
72         <marc inputformat="marc" outputformat="marcxml"
73               inputcharset="utf8"/>
74         </backend>
75       </retrieval>
76       <retrieval syntax="usmarc">
77         <backend syntax="usmarc" name="F">
78         </backend>
79         </retrieval>
80       </retrievalinfo>
81     </filter>
82
83   </filters>
84   <routes>
85     <route id="start">
86       <filter type="frontend_net">
87         <port>@:7090</port>
88         <!-- maximum connections within a minute from same IP -->
89         <connect-max>10</connect-max> 
90       </filter>
91
92       <!-- converts SRU to Z39.50 and back -->
93       <filter type="sru_z3950"/>
94
95       <filter type="log">
96         <message>F</message>
97         <category init-options="true" apdu="false"/>
98       </filter>
99
100       <!-- converts CQL to RPN -->
101       <filter type="cql_rpn">
102         <conversion file="cql2pqf.txt"/>
103       </filter>
104
105       <!-- RPN Query rewrite .. Does query check as well -->
106       <filter type="query_rewrite">
107        <xslt stylesheet="pqf2pqf-loc.xsl"/>
108       </filter>
109
110       <filter type="limit">
111         <limit bandwidth="50000" pdu="100" search="5" retrieve="50"/>
112       </filter>
113       <filter type="session_shared"> 
114         <resultset ttl="10" max="3"/>
115         <session ttl="30"/>
116       </filter>
117       <filter type="virt_db">
118         <virtual>
119           <database>idtest</database>
120           <target>localhost:9999/Default</target>
121         </virtual>
122         <virtual>
123           <database>LCDB_UTF8</database>
124           <target>z3950.loc.gov:7097/LCDB_UTF8</target>
125         </virtual>
126         <virtual>
127           <database>LCDB_MARC8</database>
128           <target>z3950.loc.gov:7095/LCDB_MARC8</target>
129         </virtual>
130         <virtual>
131           <database>HLAS_UTF8</database>
132           <target>z3950.loc.gov:7999/HLAS_UTF8</target>
133         </virtual>
134         <virtual>
135           <database>HLAS_MARC8</database>
136           <target>z3950.loc.gov:7990/HLAS_MARC8</target>
137         </virtual>
138         <virtual>
139           <database>NLSBPH_UTF8</database>
140           <target>z3950.loc.gov:7499/NLSBPH_UTF8</target>
141         </virtual>
142         <virtual>
143           <database>NLSBPH_MARC8</database>
144           <target>z3950.loc.gov:7490/NLSBPH_MARC8</target>
145         </virtual>
146         <virtual>
147           <database>Name_Authority_File</database>
148           <target>sun4.loc.gov:9018/NAF</target>
149         </virtual>
150         <virtual>
151           <database>Subject_Authority_File</database>
152           <target>sun4.loc.gov:9019/SAF</target>
153         </virtual>
154         <virtual>
155           <database>Server_in_the_UK</database>
156           <target>blah.blah.uk:210/Aleph</target>
157         </virtual>
158         <virtual>
159           <database>Server_in_Califorina</database>
160           <target>blah.blah.edu:210/Unicorn</target>
161         </virtual>
162         <virtual>
163           <database>Performing_Arts_Encylopedia</database>
164           <target>sun4.loc.gov:9013/PAE</target>
165         </virtual>
166         <virtual>
167           <database>Veterans_History_Project</database>
168           <target>sun4.loc.gov:9013/VETS</target>
169         </virtual>
170
171         <!-- merged results -->
172         <virtual>
173           <database>AllVoyager</database>
174           <target>z3950.loc.gov:7097/LCDB_UTF8</target>
175           <target>z3950.loc.gov:7999/HLAS_UTF8</target>
176           <target>z3950.loc.gov:7999/NLSBPH_UTF8</target>
177         </virtual>
178
179       </filter>
180
181       <!-- merge and route -->
182       <filter type="multi">
183         <target route="idtest">localhost*</target>
184         <target route="lcdb_utf8">z3950.loc.gov:7097/LCDB_UTF8</target>
185         <target route="lcdb_marc8">z3950.loc.gov:7095/LCDB_MARC8</target>
186         <target route="utf8">*UTF8</target>
187       </filter>
188       <!-- other targets.. MARC-8 and foreign .. -->
189       <filter refid="marc8-records"/>
190       <filter type="z3950_client"/>
191       <filter type="bounce"/>
192     </route>
193
194     <!-- idtest -->
195     <route id="idtest">
196       <filter type="virt_db">
197         <virtual>
198           <database>Default</database>
199           <target>localhost:9001/Default</target>
200           <target>localhost:9002/Default</target>
201         </virtual>
202       </filter>
203       <filter type="load_balance"/>
204       <filter type="z3950_client"/>
205       <filter type="bounce"/>
206     </route>
207
208     <!-- lcdb utf8 -->
209     <route id="lcdb_utf8">
210       <filter type="virt_db">
211         <virtual>
212           <database>LCDB_UTF8</database>
213           <target>z3950.loc.gov:7097/voyager</target>
214           <target>z3950.loc.gov:7098/voyager</target>
215         </virtual>
216       </filter>
217       <filter type="load_balance"/>
218       <filter refid="utf8-records"/>
219       <filter type="z3950_client"/>
220       <filter type="bounce"/>
221     </route>
222
223     <!-- lcdb marc8 -->
224     <route id="lcdb_marc8">
225       <filter type="virt_db">
226         <virtual>
227           <database>LCDB_MARC8</database>
228           <target>z3950.loc.gov:7095/voyager</target>
229           <target>z3950.loc.gov:7096/voyager</target>
230         </virtual>
231       </filter>
232       <filter type="load_balance"/>
233       <filter refid="marc8-records"/>
234       <filter type="z3950_client"/>
235       <filter type="bounce"/>
236     </route>
237
238     <!-- other utf8 targets -->
239     <route id="utf8">
240       <filter refid="utf8-records"/>
241       <filter type="z3950_client"/>
242       <filter type="bounce"/>
243     </route>
244
245   </routes>
246 </metaproxy>
247