+ char fpath[1024];
+ char *fname = nmem_dup_xml_content(gfs_nmem, ptr->children);
+ if (yaz_filepath_resolve(fname, base_path, 0, fpath))
+ fname = fpath;
+
+ gfs->cql_transform = cql_transform_open_fname(fname);
+ if (!gfs->cql_transform)
+ {
+ yaz_log(YLOG_FATAL|YLOG_ERRNO,
+ "open CQL transform file '%s'", fname);
+ exit(1);
+ }
+ }
+ else if (!strcmp((const char *) ptr->name, "ccl2rpn"))
+ {
+ char *fname, fpath[1024];
+ FILE *f;
+
+ fname = nmem_dup_xml_content(gfs_nmem, ptr->children);
+ if (yaz_filepath_resolve(fname, base_path, 0, fpath))
+ fname = fpath;
+
+ if ((f = fopen(fname, "r")) == 0) {
+ yaz_log(YLOG_FATAL, "can't open CCL file '%s'", fname);
+ exit(1);
+ }
+ gfs->ccl_transform = ccl_qual_mk();
+ ccl_qual_file (gfs->ccl_transform, f);
+ fclose(f);