X-Git-Url: http://git.indexdata.com/?p=mp-xquery-moved-to-github.git;a=blobdiff_plain;f=src%2Fmetaproxy_filter_xquery.cpp;h=466164c28b786ff8da208c7853e386a7157a7532;hp=b74885dbff2b63c81a653c890881a019651453b6;hb=b9f90637a6c007fd488f925be8dbfd144caee05b;hpb=a7102f81c218d0b8d5ced76acfdaee7d5f8ac8c9 diff --git a/src/metaproxy_filter_xquery.cpp b/src/metaproxy_filter_xquery.cpp index b74885d..466164c 100644 --- a/src/metaproxy_filter_xquery.cpp +++ b/src/metaproxy_filter_xquery.cpp @@ -319,7 +319,7 @@ void yf::XQuery::configure(const xmlNode * ptr, bool test_only, { if (ptr->type != XML_ELEMENT_NODE) continue; - if (!strcmp((const char *) ptr->name, "setVariable")) + if (!strcmp((const char *) ptr->name, "variable")) { std::string name; std::string value; @@ -338,29 +338,29 @@ void yf::XQuery::configure(const xmlNode * ptr, bool test_only, } else if (!strcmp((const char *) ptr->name, "script")) { - std::string value; + std::string name; struct _xmlAttr *attr; for (attr = ptr->properties; attr; attr = attr->next) - if (!strcmp((const char *) attr->name, "value")) - value = mp::xml::get_text(attr->children); + if (!strcmp((const char *) attr->name, "name")) + name = mp::xml::get_text(attr->children); else throw mp::filter::FilterException( "Bad attribute " + std::string((const char *) attr->name)); - zorba_script = value; + zorba_script = name; } else if (!strcmp((const char *) ptr->name, "record")) { - std::string value; + std::string name; struct _xmlAttr *attr; for (attr = ptr->properties; attr; attr = attr->next) - if (!strcmp((const char *) attr->name, "value")) - value = mp::xml::get_text(attr->children); + if (!strcmp((const char *) attr->name, "name")) + name = mp::xml::get_text(attr->children); else throw mp::filter::FilterException( "Bad attribute " + std::string((const char *) attr->name)); - zorba_record_variable = value; + zorba_record_variable = name; } else {