+ else if (!strcmp((const char *) ptr->name, "fieldmap"))
+ {
+ const struct _xmlAttr *attr;
+ std::string ccl_field;
+ std::string cql_field;
+ for (attr = ptr->properties; attr; attr = attr->next)
+ {
+ if (!strcmp((const char *) attr->name, "ccl"))
+ ccl_field = mp::xml::get_text(attr->children);
+ else if (!strcmp((const char *) attr->name, "cql"))
+ cql_field = mp::xml::get_text(attr->children);
+ else
+ throw mp::filter::FilterException(
+ "Bad attribute " + std::string((const char *)
+ attr->name));
+ }
+ if (ccl_field.length() && cql_field.length())
+ fieldmap[cql_field] = ccl_field;
+ }