1 /* This file is part of Metaproxy.
2 Copyright (C) 2005-2011 Index Data
4 Metaproxy is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2, or (at your option) any later
9 Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
10 WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 #include <yaz/options.h>
26 #include <metaproxy/filter.hpp>
27 #include <metaproxy/package.hpp>
28 #include "router_flexml.hpp"
29 #include "factory_static.hpp"
31 namespace mp = metaproxy_1;
33 int main(int argc, char **argv)
41 while ((ret = options("h{help}c{config}:",
42 argv, argc, &arg)) != -2)
47 std::cerr << "bad option " << arg << std::endl;
49 std::cerr << "ex_router_flexml\n"
51 " -c|--config fname configuation\n"
62 doc = xmlParseFile(fname);
65 std::cerr << "xmlParseFile failed\n";
71 std::cerr << "No configuration given\n";
76 mp::FactoryStatic factory;
77 mp::RouterFleXML router(doc, factory, false, 0);
81 pack.router(router).move();
87 std::cerr << "Unknown Exception" << std::endl;
98 * c-file-style: "Stroustrup"
99 * indent-tabs-mode: nil
101 * vim: shiftwidth=4 tabstop=8 expandtab