1 /* $Id: ex_router_flexml.cpp,v 1.12 2008-02-20 10:51:11 adam Exp $
2 Copyright (c) 2005-2007, Index Data.
4 This file is part of Metaproxy.
6 Metaproxy is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 2, or (at your option) any later
11 Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 You should have received a copy of the GNU General Public License
17 along with Metaproxy; see the file LICENSE. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
24 #include <yaz/options.h>
30 #include "package.hpp"
31 #include "router_flexml.hpp"
32 #include "factory_static.hpp"
34 namespace mp = metaproxy_1;
36 int main(int argc, char **argv)
44 while ((ret = options("h{help}c{config}:",
45 argv, argc, &arg)) != -2)
50 std::cerr << "bad option " << arg << std::endl;
52 std::cerr << "ex_router_flexml\n"
54 " -c|--config fname configuation\n"
65 doc = xmlParseFile(fname);
68 std::cerr << "xmlParseFile failed\n";
74 std::cerr << "No configuration given\n";
79 mp::FactoryStatic factory;
80 mp::RouterFleXML router(doc, factory);
84 pack.router(router).move();
90 std::cerr << "Unknown Exception" << std::endl;
101 * indent-tabs-mode: nil
102 * c-file-style: "stroustrup"
104 * vim: shiftwidth=4 tabstop=8 expandtab